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

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

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

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

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import io.kubernetes.client.openapi.models.V1APIResourceList;
import io.kubernetes.client.openapi.models.V1DeleteOptions;
import io.kubernetes.client.openapi.models.V1Ingress;
import io.kubernetes.client.openapi.models.V1IngressClass;
import io.kubernetes.client.openapi.models.V1IngressClassList;
import io.kubernetes.client.openapi.models.V1IngressList;
import io.kubernetes.client.openapi.models.V1NetworkPolicy;
import io.kubernetes.client.openapi.models.V1NetworkPolicyList;
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 NetworkingV1Api {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public NetworkingV1Api(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 createIngressClassCall(V1IngressClass 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/networking.k8s.io/v1/ingressclasses";

        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 createIngressClassValidateBeforeCall(V1IngressClass 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 createIngressClass(Async)");
        }

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

    }


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

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

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

    public class APIcreateIngressClassRequest {
        private final V1IngressClass body;
        private String pretty;
        private String dryRun;
        private String fieldManager;
        private String fieldValidation;

        private APIcreateIngressClassRequest(V1IngressClass 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 APIcreateIngressClassRequest
         */
        public APIcreateIngressClassRequest 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 APIcreateIngressClassRequest
         */
        public APIcreateIngressClassRequest 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 APIcreateIngressClassRequest
         */
        public APIcreateIngressClassRequest 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 APIcreateIngressClassRequest
         */
        public APIcreateIngressClassRequest fieldValidation(String fieldValidation) {
            this.fieldValidation = fieldValidation;
            return this;
        }

        /**
         * Build call for createIngressClass
         * @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 createIngressClassCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute createIngressClass request * @return V1IngressClass * @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 V1IngressClass execute() throws ApiException { ApiResponse localVarResp = createIngressClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute createIngressClass request with HTTP info returned * @return ApiResponse<V1IngressClass> * @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 createIngressClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute createIngressClass request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createIngressClassAsync(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * create an IngressClass * @param body (required) * @return APIcreateIngressClassRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public APIcreateIngressClassRequest createIngressClass(V1IngressClass body) { return new APIcreateIngressClassRequest(body); } private okhttp3.Call createNamespacedIngressCall(String namespace, V1Ingress 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses" .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createNamespacedIngressValidateBeforeCall(String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling createNamespacedIngress(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createNamespacedIngress(Async)"); } return createNamespacedIngressCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse createNamespacedIngressWithHttpInfo(String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = createNamespacedIngressValidateBeforeCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createNamespacedIngressAsync(String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createNamespacedIngressValidateBeforeCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIcreateNamespacedIngressRequest { private final String namespace; private final V1Ingress body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIcreateNamespacedIngressRequest(String namespace, V1Ingress body) { this.namespace = namespace; 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 APIcreateNamespacedIngressRequest */ public APIcreateNamespacedIngressRequest 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 APIcreateNamespacedIngressRequest */ public APIcreateNamespacedIngressRequest 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 APIcreateNamespacedIngressRequest */ public APIcreateNamespacedIngressRequest 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 APIcreateNamespacedIngressRequest */ public APIcreateNamespacedIngressRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for createNamespacedIngress * @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 createNamespacedIngressCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute createNamespacedIngress request * @return V1Ingress * @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 V1Ingress execute() throws ApiException { ApiResponse localVarResp = createNamespacedIngressWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute createNamespacedIngress request with HTTP info returned * @return ApiResponse<V1Ingress> * @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 createNamespacedIngressWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute createNamespacedIngress request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createNamespacedIngressAsync(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * create an Ingress * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIcreateNamespacedIngressRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public APIcreateNamespacedIngressRequest createNamespacedIngress(String namespace, V1Ingress body) { return new APIcreateNamespacedIngressRequest(namespace, body); } private okhttp3.Call createNamespacedNetworkPolicyCall(String namespace, V1NetworkPolicy 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/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies" .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createNamespacedNetworkPolicyValidateBeforeCall(String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling createNamespacedNetworkPolicy(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createNamespacedNetworkPolicy(Async)"); } return createNamespacedNetworkPolicyCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse createNamespacedNetworkPolicyWithHttpInfo(String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = createNamespacedNetworkPolicyValidateBeforeCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createNamespacedNetworkPolicyAsync(String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createNamespacedNetworkPolicyValidateBeforeCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIcreateNamespacedNetworkPolicyRequest { private final String namespace; private final V1NetworkPolicy body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIcreateNamespacedNetworkPolicyRequest(String namespace, V1NetworkPolicy body) { this.namespace = namespace; 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 APIcreateNamespacedNetworkPolicyRequest */ public APIcreateNamespacedNetworkPolicyRequest 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 APIcreateNamespacedNetworkPolicyRequest */ public APIcreateNamespacedNetworkPolicyRequest 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 APIcreateNamespacedNetworkPolicyRequest */ public APIcreateNamespacedNetworkPolicyRequest 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 APIcreateNamespacedNetworkPolicyRequest */ public APIcreateNamespacedNetworkPolicyRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for createNamespacedNetworkPolicy * @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 createNamespacedNetworkPolicyCall(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute createNamespacedNetworkPolicy request * @return V1NetworkPolicy * @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 V1NetworkPolicy execute() throws ApiException { ApiResponse localVarResp = createNamespacedNetworkPolicyWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute createNamespacedNetworkPolicy request with HTTP info returned * @return ApiResponse<V1NetworkPolicy> * @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 createNamespacedNetworkPolicyWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute createNamespacedNetworkPolicy request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createNamespacedNetworkPolicyAsync(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * create a NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIcreateNamespacedNetworkPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public APIcreateNamespacedNetworkPolicyRequest createNamespacedNetworkPolicy(String namespace, V1NetworkPolicy body) { return new APIcreateNamespacedNetworkPolicyRequest(namespace, body); } private okhttp3.Call deleteCollectionIngressClassCall(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/networking.k8s.io/v1/ingressclasses"; 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 deleteCollectionIngressClassValidateBeforeCall(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 deleteCollectionIngressClassCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } private ApiResponse deleteCollectionIngressClassWithHttpInfo(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 = deleteCollectionIngressClassValidateBeforeCall(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 deleteCollectionIngressClassAsync(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 = deleteCollectionIngressClassValidateBeforeCall(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 APIdeleteCollectionIngressClassRequest { 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 APIdeleteCollectionIngressClassRequest() { } /** * 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest _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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest 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 APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set body * @param body (optional) * @return APIdeleteCollectionIngressClassRequest */ public APIdeleteCollectionIngressClassRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteCollectionIngressClass * @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 deleteCollectionIngressClassCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } /** * Execute deleteCollectionIngressClass 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 = deleteCollectionIngressClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); return localVarResp.getData(); } /** * Execute deleteCollectionIngressClass 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 deleteCollectionIngressClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); } /** * Execute deleteCollectionIngressClass 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 deleteCollectionIngressClassAsync(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } } /** * * delete collection of IngressClass * @return APIdeleteCollectionIngressClassRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIdeleteCollectionIngressClassRequest deleteCollectionIngressClass() { return new APIdeleteCollectionIngressClassRequest(); } private okhttp3.Call deleteCollectionNamespacedIngressCall(String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses" .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 (_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 deleteCollectionNamespacedIngressValidateBeforeCall(String namespace, 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 { // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteCollectionNamespacedIngress(Async)"); } return deleteCollectionNamespacedIngressCall(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } private ApiResponse deleteCollectionNamespacedIngressWithHttpInfo(String namespace, 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 = deleteCollectionNamespacedIngressValidateBeforeCall(namespace, 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 deleteCollectionNamespacedIngressAsync(String namespace, 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 = deleteCollectionNamespacedIngressValidateBeforeCall(namespace, 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 APIdeleteCollectionNamespacedIngressRequest { private final String namespace; 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 APIdeleteCollectionNamespacedIngressRequest(String namespace) { this.namespace = namespace; } /** * 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest _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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest 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 APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set body * @param body (optional) * @return APIdeleteCollectionNamespacedIngressRequest */ public APIdeleteCollectionNamespacedIngressRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteCollectionNamespacedIngress * @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 deleteCollectionNamespacedIngressCall(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } /** * Execute deleteCollectionNamespacedIngress 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 = deleteCollectionNamespacedIngressWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); return localVarResp.getData(); } /** * Execute deleteCollectionNamespacedIngress 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 deleteCollectionNamespacedIngressWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); } /** * Execute deleteCollectionNamespacedIngress 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 deleteCollectionNamespacedIngressAsync(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } } /** * * delete collection of Ingress * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedIngressRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIdeleteCollectionNamespacedIngressRequest deleteCollectionNamespacedIngress(String namespace) { return new APIdeleteCollectionNamespacedIngressRequest(namespace); } private okhttp3.Call deleteCollectionNamespacedNetworkPolicyCall(String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies" .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 (_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 deleteCollectionNamespacedNetworkPolicyValidateBeforeCall(String namespace, 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 { // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteCollectionNamespacedNetworkPolicy(Async)"); } return deleteCollectionNamespacedNetworkPolicyCall(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } private ApiResponse deleteCollectionNamespacedNetworkPolicyWithHttpInfo(String namespace, 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 = deleteCollectionNamespacedNetworkPolicyValidateBeforeCall(namespace, 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 deleteCollectionNamespacedNetworkPolicyAsync(String namespace, 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 = deleteCollectionNamespacedNetworkPolicyValidateBeforeCall(namespace, 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 APIdeleteCollectionNamespacedNetworkPolicyRequest { private final String namespace; 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 APIdeleteCollectionNamespacedNetworkPolicyRequest(String namespace) { this.namespace = namespace; } /** * 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest _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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest 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 APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set body * @param body (optional) * @return APIdeleteCollectionNamespacedNetworkPolicyRequest */ public APIdeleteCollectionNamespacedNetworkPolicyRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteCollectionNamespacedNetworkPolicy * @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 deleteCollectionNamespacedNetworkPolicyCall(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } /** * Execute deleteCollectionNamespacedNetworkPolicy 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 = deleteCollectionNamespacedNetworkPolicyWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); return localVarResp.getData(); } /** * Execute deleteCollectionNamespacedNetworkPolicy 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 deleteCollectionNamespacedNetworkPolicyWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); } /** * Execute deleteCollectionNamespacedNetworkPolicy 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 deleteCollectionNamespacedNetworkPolicyAsync(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } } /** * * delete collection of NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedNetworkPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIdeleteCollectionNamespacedNetworkPolicyRequest deleteCollectionNamespacedNetworkPolicy(String namespace) { return new APIdeleteCollectionNamespacedNetworkPolicyRequest(namespace); } private okhttp3.Call deleteIngressClassCall(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/networking.k8s.io/v1/ingressclasses/{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 deleteIngressClassValidateBeforeCall(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 deleteIngressClass(Async)"); } return deleteIngressClassCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } private ApiResponse deleteIngressClassWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteIngressClassValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteIngressClassAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteIngressClassValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteIngressClassRequest { private final String name; private String pretty; private String dryRun; private Integer gracePeriodSeconds; private Boolean orphanDependents; private String propagationPolicy; private V1DeleteOptions body; private APIdeleteIngressClassRequest(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 APIdeleteIngressClassRequest */ public APIdeleteIngressClassRequest 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 APIdeleteIngressClassRequest */ public APIdeleteIngressClassRequest 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 APIdeleteIngressClassRequest */ public APIdeleteIngressClassRequest 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 APIdeleteIngressClassRequest */ public APIdeleteIngressClassRequest 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 APIdeleteIngressClassRequest */ public APIdeleteIngressClassRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set body * @param body (optional) * @return APIdeleteIngressClassRequest */ public APIdeleteIngressClassRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteIngressClass * @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 deleteIngressClassCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } /** * Execute deleteIngressClass 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 = deleteIngressClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); return localVarResp.getData(); } /** * Execute deleteIngressClass 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 deleteIngressClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); } /** * Execute deleteIngressClass 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 deleteIngressClassAsync(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } } /** * * delete an IngressClass * @param name name of the IngressClass (required) * @return APIdeleteIngressClassRequest * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public APIdeleteIngressClassRequest deleteIngressClass(String name) { return new APIdeleteIngressClassRequest(name); } private okhttp3.Call deleteNamespacedIngressCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 deleteNamespacedIngressValidateBeforeCall(String name, String namespace, 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 deleteNamespacedIngress(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteNamespacedIngress(Async)"); } return deleteNamespacedIngressCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } private ApiResponse deleteNamespacedIngressWithHttpInfo(String name, String namespace, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteNamespacedIngressValidateBeforeCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteNamespacedIngressAsync(String name, String namespace, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteNamespacedIngressValidateBeforeCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteNamespacedIngressRequest { private final String name; private final String namespace; private String pretty; private String dryRun; private Integer gracePeriodSeconds; private Boolean orphanDependents; private String propagationPolicy; private V1DeleteOptions body; private APIdeleteNamespacedIngressRequest(String name, String namespace) { this.name = name; this.namespace = namespace; } /** * 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 APIdeleteNamespacedIngressRequest */ public APIdeleteNamespacedIngressRequest 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 APIdeleteNamespacedIngressRequest */ public APIdeleteNamespacedIngressRequest 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 APIdeleteNamespacedIngressRequest */ public APIdeleteNamespacedIngressRequest 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 APIdeleteNamespacedIngressRequest */ public APIdeleteNamespacedIngressRequest 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 APIdeleteNamespacedIngressRequest */ public APIdeleteNamespacedIngressRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set body * @param body (optional) * @return APIdeleteNamespacedIngressRequest */ public APIdeleteNamespacedIngressRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteNamespacedIngress * @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 deleteNamespacedIngressCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } /** * Execute deleteNamespacedIngress 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 = deleteNamespacedIngressWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); return localVarResp.getData(); } /** * Execute deleteNamespacedIngress 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 deleteNamespacedIngressWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); } /** * Execute deleteNamespacedIngress 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 deleteNamespacedIngressAsync(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } } /** * * delete an Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteNamespacedIngressRequest * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public APIdeleteNamespacedIngressRequest deleteNamespacedIngress(String name, String namespace) { return new APIdeleteNamespacedIngressRequest(name, namespace); } private okhttp3.Call deleteNamespacedNetworkPolicyCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 deleteNamespacedNetworkPolicyValidateBeforeCall(String name, String namespace, 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 deleteNamespacedNetworkPolicy(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteNamespacedNetworkPolicy(Async)"); } return deleteNamespacedNetworkPolicyCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } private ApiResponse deleteNamespacedNetworkPolicyWithHttpInfo(String name, String namespace, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteNamespacedNetworkPolicyValidateBeforeCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteNamespacedNetworkPolicyAsync(String name, String namespace, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteNamespacedNetworkPolicyValidateBeforeCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteNamespacedNetworkPolicyRequest { private final String name; private final String namespace; private String pretty; private String dryRun; private Integer gracePeriodSeconds; private Boolean orphanDependents; private String propagationPolicy; private V1DeleteOptions body; private APIdeleteNamespacedNetworkPolicyRequest(String name, String namespace) { this.name = name; this.namespace = namespace; } /** * 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 APIdeleteNamespacedNetworkPolicyRequest */ public APIdeleteNamespacedNetworkPolicyRequest 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 APIdeleteNamespacedNetworkPolicyRequest */ public APIdeleteNamespacedNetworkPolicyRequest 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 APIdeleteNamespacedNetworkPolicyRequest */ public APIdeleteNamespacedNetworkPolicyRequest 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 APIdeleteNamespacedNetworkPolicyRequest */ public APIdeleteNamespacedNetworkPolicyRequest 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 APIdeleteNamespacedNetworkPolicyRequest */ public APIdeleteNamespacedNetworkPolicyRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set body * @param body (optional) * @return APIdeleteNamespacedNetworkPolicyRequest */ public APIdeleteNamespacedNetworkPolicyRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteNamespacedNetworkPolicy * @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 deleteNamespacedNetworkPolicyCall(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } /** * Execute deleteNamespacedNetworkPolicy 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 = deleteNamespacedNetworkPolicyWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); return localVarResp.getData(); } /** * Execute deleteNamespacedNetworkPolicy 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 deleteNamespacedNetworkPolicyWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); } /** * Execute deleteNamespacedNetworkPolicy 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 deleteNamespacedNetworkPolicyAsync(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } } /** * * delete a NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteNamespacedNetworkPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public APIdeleteNamespacedNetworkPolicyRequest deleteNamespacedNetworkPolicy(String name, String namespace) { return new APIdeleteNamespacedNetworkPolicyRequest(name, namespace); } 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/networking.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 listIngressClassCall(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/networking.k8s.io/v1/ingressclasses"; 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 listIngressClassValidateBeforeCall(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 listIngressClassCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listIngressClassWithHttpInfo(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 = listIngressClassValidateBeforeCall(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 listIngressClassAsync(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 = listIngressClassValidateBeforeCall(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 APIlistIngressClassRequest { 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 APIlistIngressClassRequest() { } /** * 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest _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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest 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 APIlistIngressClassRequest */ public APIlistIngressClassRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listIngressClass * @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 listIngressClassCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listIngressClass request * @return V1IngressClassList * @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 V1IngressClassList execute() throws ApiException { ApiResponse localVarResp = listIngressClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listIngressClass request with HTTP info returned * @return ApiResponse<V1IngressClassList> * @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 listIngressClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listIngressClass 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 listIngressClassAsync(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind IngressClass * @return APIlistIngressClassRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistIngressClassRequest listIngressClass() { return new APIlistIngressClassRequest(); } private okhttp3.Call listIngressForAllNamespacesCall(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, 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/networking.k8s.io/v1/ingresses"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } 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 listIngressForAllNamespacesValidateBeforeCall(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { return listIngressForAllNamespacesCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listIngressForAllNamespacesWithHttpInfo(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { okhttp3.Call localVarCall = listIngressForAllNamespacesValidateBeforeCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listIngressForAllNamespacesAsync(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listIngressForAllNamespacesValidateBeforeCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistIngressForAllNamespacesRequest { private Boolean allowWatchBookmarks; private String _continue; private String fieldSelector; private String labelSelector; private Integer limit; private String pretty; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private Boolean watch; private APIlistIngressForAllNamespacesRequest() { } /** * 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest _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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest limit(Integer limit) { this.limit = limit; return this; } /** * 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest pretty(String pretty) { this.pretty = pretty; 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest 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 APIlistIngressForAllNamespacesRequest */ public APIlistIngressForAllNamespacesRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listIngressForAllNamespaces * @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 listIngressForAllNamespacesCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listIngressForAllNamespaces request * @return V1IngressList * @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 V1IngressList execute() throws ApiException { ApiResponse localVarResp = listIngressForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listIngressForAllNamespaces request with HTTP info returned * @return ApiResponse<V1IngressList> * @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 listIngressForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listIngressForAllNamespaces 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 listIngressForAllNamespacesAsync(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind Ingress * @return APIlistIngressForAllNamespacesRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistIngressForAllNamespacesRequest listIngressForAllNamespaces() { return new APIlistIngressForAllNamespacesRequest(); } private okhttp3.Call listNamespacedIngressCall(String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses" .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 (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 listNamespacedIngressValidateBeforeCall(String namespace, 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 { // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling listNamespacedIngress(Async)"); } return listNamespacedIngressCall(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listNamespacedIngressWithHttpInfo(String namespace, 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 = listNamespacedIngressValidateBeforeCall(namespace, 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 listNamespacedIngressAsync(String namespace, 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 = listNamespacedIngressValidateBeforeCall(namespace, 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 APIlistNamespacedIngressRequest { private final String namespace; 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 APIlistNamespacedIngressRequest(String namespace) { this.namespace = namespace; } /** * 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest _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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest 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 APIlistNamespacedIngressRequest */ public APIlistNamespacedIngressRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listNamespacedIngress * @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 listNamespacedIngressCall(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listNamespacedIngress request * @return V1IngressList * @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 V1IngressList execute() throws ApiException { ApiResponse localVarResp = listNamespacedIngressWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listNamespacedIngress request with HTTP info returned * @return ApiResponse<V1IngressList> * @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 listNamespacedIngressWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listNamespacedIngress 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 listNamespacedIngressAsync(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind Ingress * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedIngressRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistNamespacedIngressRequest listNamespacedIngress(String namespace) { return new APIlistNamespacedIngressRequest(namespace); } private okhttp3.Call listNamespacedNetworkPolicyCall(String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies" .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 (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 listNamespacedNetworkPolicyValidateBeforeCall(String namespace, 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 { // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling listNamespacedNetworkPolicy(Async)"); } return listNamespacedNetworkPolicyCall(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listNamespacedNetworkPolicyWithHttpInfo(String namespace, 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 = listNamespacedNetworkPolicyValidateBeforeCall(namespace, 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 listNamespacedNetworkPolicyAsync(String namespace, 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 = listNamespacedNetworkPolicyValidateBeforeCall(namespace, 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 APIlistNamespacedNetworkPolicyRequest { private final String namespace; 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 APIlistNamespacedNetworkPolicyRequest(String namespace) { this.namespace = namespace; } /** * 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest _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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest 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 APIlistNamespacedNetworkPolicyRequest */ public APIlistNamespacedNetworkPolicyRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listNamespacedNetworkPolicy * @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 listNamespacedNetworkPolicyCall(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listNamespacedNetworkPolicy request * @return V1NetworkPolicyList * @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 V1NetworkPolicyList execute() throws ApiException { ApiResponse localVarResp = listNamespacedNetworkPolicyWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listNamespacedNetworkPolicy request with HTTP info returned * @return ApiResponse<V1NetworkPolicyList> * @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 listNamespacedNetworkPolicyWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listNamespacedNetworkPolicy 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 listNamespacedNetworkPolicyAsync(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedNetworkPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistNamespacedNetworkPolicyRequest listNamespacedNetworkPolicy(String namespace) { return new APIlistNamespacedNetworkPolicyRequest(namespace); } private okhttp3.Call listNetworkPolicyForAllNamespacesCall(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, 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/networking.k8s.io/v1/networkpolicies"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } 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 listNetworkPolicyForAllNamespacesValidateBeforeCall(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { return listNetworkPolicyForAllNamespacesCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listNetworkPolicyForAllNamespacesWithHttpInfo(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { okhttp3.Call localVarCall = listNetworkPolicyForAllNamespacesValidateBeforeCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listNetworkPolicyForAllNamespacesAsync(Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String pretty, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listNetworkPolicyForAllNamespacesValidateBeforeCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistNetworkPolicyForAllNamespacesRequest { private Boolean allowWatchBookmarks; private String _continue; private String fieldSelector; private String labelSelector; private Integer limit; private String pretty; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private Boolean watch; private APIlistNetworkPolicyForAllNamespacesRequest() { } /** * 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest _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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest limit(Integer limit) { this.limit = limit; return this; } /** * 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest pretty(String pretty) { this.pretty = pretty; 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest 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 APIlistNetworkPolicyForAllNamespacesRequest */ public APIlistNetworkPolicyForAllNamespacesRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listNetworkPolicyForAllNamespaces * @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 listNetworkPolicyForAllNamespacesCall(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listNetworkPolicyForAllNamespaces request * @return V1NetworkPolicyList * @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 V1NetworkPolicyList execute() throws ApiException { ApiResponse localVarResp = listNetworkPolicyForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listNetworkPolicyForAllNamespaces request with HTTP info returned * @return ApiResponse<V1NetworkPolicyList> * @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 listNetworkPolicyForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listNetworkPolicyForAllNamespaces 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 listNetworkPolicyForAllNamespacesAsync(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind NetworkPolicy * @return APIlistNetworkPolicyForAllNamespacesRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistNetworkPolicyForAllNamespacesRequest listNetworkPolicyForAllNamespaces() { return new APIlistNetworkPolicyForAllNamespacesRequest(); } private okhttp3.Call patchIngressClassCall(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/networking.k8s.io/v1/ingressclasses/{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 patchIngressClassValidateBeforeCall(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 patchIngressClass(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchIngressClass(Async)"); } return patchIngressClassCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchIngressClassWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchIngressClassValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchIngressClassAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchIngressClassValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchIngressClassRequest { private final String name; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchIngressClassRequest(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 APIpatchIngressClassRequest */ public APIpatchIngressClassRequest 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 APIpatchIngressClassRequest */ public APIpatchIngressClassRequest 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 APIpatchIngressClassRequest */ public APIpatchIngressClassRequest 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 APIpatchIngressClassRequest */ public APIpatchIngressClassRequest 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 APIpatchIngressClassRequest */ public APIpatchIngressClassRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchIngressClass * @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 patchIngressClassCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchIngressClass request * @return V1IngressClass * @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 V1IngressClass execute() throws ApiException { ApiResponse localVarResp = patchIngressClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchIngressClass request with HTTP info returned * @return ApiResponse<V1IngressClass> * @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 patchIngressClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchIngressClass 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 patchIngressClassAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update the specified IngressClass * @param name name of the IngressClass (required) * @param body (required) * @return APIpatchIngressClassRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchIngressClassRequest patchIngressClass(String name, V1Patch body) { return new APIpatchIngressClassRequest(name, body); } private okhttp3.Call patchNamespacedIngressCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 patchNamespacedIngressValidateBeforeCall(String name, String namespace, 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 patchNamespacedIngress(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling patchNamespacedIngress(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchNamespacedIngress(Async)"); } return patchNamespacedIngressCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchNamespacedIngressWithHttpInfo(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchNamespacedIngressValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchNamespacedIngressAsync(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchNamespacedIngressValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchNamespacedIngressRequest { private final String name; private final String namespace; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchNamespacedIngressRequest(String name, String namespace, V1Patch body) { this.name = name; this.namespace = namespace; 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 APIpatchNamespacedIngressRequest */ public APIpatchNamespacedIngressRequest 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 APIpatchNamespacedIngressRequest */ public APIpatchNamespacedIngressRequest 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 APIpatchNamespacedIngressRequest */ public APIpatchNamespacedIngressRequest 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 APIpatchNamespacedIngressRequest */ public APIpatchNamespacedIngressRequest 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 APIpatchNamespacedIngressRequest */ public APIpatchNamespacedIngressRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchNamespacedIngress * @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 patchNamespacedIngressCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchNamespacedIngress request * @return V1Ingress * @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 V1Ingress execute() throws ApiException { ApiResponse localVarResp = patchNamespacedIngressWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchNamespacedIngress request with HTTP info returned * @return ApiResponse<V1Ingress> * @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 patchNamespacedIngressWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchNamespacedIngress 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 patchNamespacedIngressAsync(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIpatchNamespacedIngressRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchNamespacedIngressRequest patchNamespacedIngress(String name, String namespace, V1Patch body) { return new APIpatchNamespacedIngressRequest(name, namespace, body); } private okhttp3.Call patchNamespacedIngressStatusCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 patchNamespacedIngressStatusValidateBeforeCall(String name, String namespace, 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 patchNamespacedIngressStatus(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling patchNamespacedIngressStatus(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchNamespacedIngressStatus(Async)"); } return patchNamespacedIngressStatusCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchNamespacedIngressStatusWithHttpInfo(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchNamespacedIngressStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchNamespacedIngressStatusAsync(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchNamespacedIngressStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchNamespacedIngressStatusRequest { private final String name; private final String namespace; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchNamespacedIngressStatusRequest(String name, String namespace, V1Patch body) { this.name = name; this.namespace = namespace; 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 APIpatchNamespacedIngressStatusRequest */ public APIpatchNamespacedIngressStatusRequest 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 APIpatchNamespacedIngressStatusRequest */ public APIpatchNamespacedIngressStatusRequest 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 APIpatchNamespacedIngressStatusRequest */ public APIpatchNamespacedIngressStatusRequest 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 APIpatchNamespacedIngressStatusRequest */ public APIpatchNamespacedIngressStatusRequest 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 APIpatchNamespacedIngressStatusRequest */ public APIpatchNamespacedIngressStatusRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchNamespacedIngressStatus * @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 patchNamespacedIngressStatusCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchNamespacedIngressStatus request * @return V1Ingress * @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 V1Ingress execute() throws ApiException { ApiResponse localVarResp = patchNamespacedIngressStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchNamespacedIngressStatus request with HTTP info returned * @return ApiResponse<V1Ingress> * @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 patchNamespacedIngressStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchNamespacedIngressStatus 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 patchNamespacedIngressStatusAsync(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update status of the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIpatchNamespacedIngressStatusRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchNamespacedIngressStatusRequest patchNamespacedIngressStatus(String name, String namespace, V1Patch body) { return new APIpatchNamespacedIngressStatusRequest(name, namespace, body); } private okhttp3.Call patchNamespacedNetworkPolicyCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 patchNamespacedNetworkPolicyValidateBeforeCall(String name, String namespace, 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 patchNamespacedNetworkPolicy(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling patchNamespacedNetworkPolicy(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchNamespacedNetworkPolicy(Async)"); } return patchNamespacedNetworkPolicyCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchNamespacedNetworkPolicyWithHttpInfo(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchNamespacedNetworkPolicyValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchNamespacedNetworkPolicyAsync(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchNamespacedNetworkPolicyValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchNamespacedNetworkPolicyRequest { private final String name; private final String namespace; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchNamespacedNetworkPolicyRequest(String name, String namespace, V1Patch body) { this.name = name; this.namespace = namespace; 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 APIpatchNamespacedNetworkPolicyRequest */ public APIpatchNamespacedNetworkPolicyRequest 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 APIpatchNamespacedNetworkPolicyRequest */ public APIpatchNamespacedNetworkPolicyRequest 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 APIpatchNamespacedNetworkPolicyRequest */ public APIpatchNamespacedNetworkPolicyRequest 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 APIpatchNamespacedNetworkPolicyRequest */ public APIpatchNamespacedNetworkPolicyRequest 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 APIpatchNamespacedNetworkPolicyRequest */ public APIpatchNamespacedNetworkPolicyRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchNamespacedNetworkPolicy * @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 patchNamespacedNetworkPolicyCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchNamespacedNetworkPolicy request * @return V1NetworkPolicy * @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 V1NetworkPolicy execute() throws ApiException { ApiResponse localVarResp = patchNamespacedNetworkPolicyWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchNamespacedNetworkPolicy request with HTTP info returned * @return ApiResponse<V1NetworkPolicy> * @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 patchNamespacedNetworkPolicyWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchNamespacedNetworkPolicy 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 patchNamespacedNetworkPolicyAsync(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update the specified NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIpatchNamespacedNetworkPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchNamespacedNetworkPolicyRequest patchNamespacedNetworkPolicy(String name, String namespace, V1Patch body) { return new APIpatchNamespacedNetworkPolicyRequest(name, namespace, body); } private okhttp3.Call readIngressClassCall(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/networking.k8s.io/v1/ingressclasses/{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 readIngressClassValidateBeforeCall(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 readIngressClass(Async)"); } return readIngressClassCall(name, pretty, _callback); } private ApiResponse readIngressClassWithHttpInfo(String name, String pretty) throws ApiException { okhttp3.Call localVarCall = readIngressClassValidateBeforeCall(name, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readIngressClassAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readIngressClassValidateBeforeCall(name, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadIngressClassRequest { private final String name; private String pretty; private APIreadIngressClassRequest(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 APIreadIngressClassRequest */ public APIreadIngressClassRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readIngressClass * @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 readIngressClassCall(name, pretty, _callback); } /** * Execute readIngressClass request * @return V1IngressClass * @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 V1IngressClass execute() throws ApiException { ApiResponse localVarResp = readIngressClassWithHttpInfo(name, pretty); return localVarResp.getData(); } /** * Execute readIngressClass request with HTTP info returned * @return ApiResponse<V1IngressClass> * @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 readIngressClassWithHttpInfo(name, pretty); } /** * Execute readIngressClass 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 readIngressClassAsync(name, pretty, _callback); } } /** * * read the specified IngressClass * @param name name of the IngressClass (required) * @return APIreadIngressClassRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadIngressClassRequest readIngressClass(String name) { return new APIreadIngressClassRequest(name); } private okhttp3.Call readNamespacedIngressCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 readNamespacedIngressValidateBeforeCall(String name, String namespace, 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 readNamespacedIngress(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling readNamespacedIngress(Async)"); } return readNamespacedIngressCall(name, namespace, pretty, _callback); } private ApiResponse readNamespacedIngressWithHttpInfo(String name, String namespace, String pretty) throws ApiException { okhttp3.Call localVarCall = readNamespacedIngressValidateBeforeCall(name, namespace, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readNamespacedIngressAsync(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readNamespacedIngressValidateBeforeCall(name, namespace, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadNamespacedIngressRequest { private final String name; private final String namespace; private String pretty; private APIreadNamespacedIngressRequest(String name, String namespace) { this.name = name; this.namespace = namespace; } /** * 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 APIreadNamespacedIngressRequest */ public APIreadNamespacedIngressRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readNamespacedIngress * @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 readNamespacedIngressCall(name, namespace, pretty, _callback); } /** * Execute readNamespacedIngress request * @return V1Ingress * @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 V1Ingress execute() throws ApiException { ApiResponse localVarResp = readNamespacedIngressWithHttpInfo(name, namespace, pretty); return localVarResp.getData(); } /** * Execute readNamespacedIngress request with HTTP info returned * @return ApiResponse<V1Ingress> * @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 readNamespacedIngressWithHttpInfo(name, namespace, pretty); } /** * Execute readNamespacedIngress 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 readNamespacedIngressAsync(name, namespace, pretty, _callback); } } /** * * read the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIreadNamespacedIngressRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadNamespacedIngressRequest readNamespacedIngress(String name, String namespace) { return new APIreadNamespacedIngressRequest(name, namespace); } private okhttp3.Call readNamespacedIngressStatusCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 readNamespacedIngressStatusValidateBeforeCall(String name, String namespace, 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 readNamespacedIngressStatus(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling readNamespacedIngressStatus(Async)"); } return readNamespacedIngressStatusCall(name, namespace, pretty, _callback); } private ApiResponse readNamespacedIngressStatusWithHttpInfo(String name, String namespace, String pretty) throws ApiException { okhttp3.Call localVarCall = readNamespacedIngressStatusValidateBeforeCall(name, namespace, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readNamespacedIngressStatusAsync(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readNamespacedIngressStatusValidateBeforeCall(name, namespace, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadNamespacedIngressStatusRequest { private final String name; private final String namespace; private String pretty; private APIreadNamespacedIngressStatusRequest(String name, String namespace) { this.name = name; this.namespace = namespace; } /** * 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 APIreadNamespacedIngressStatusRequest */ public APIreadNamespacedIngressStatusRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readNamespacedIngressStatus * @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 readNamespacedIngressStatusCall(name, namespace, pretty, _callback); } /** * Execute readNamespacedIngressStatus request * @return V1Ingress * @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 V1Ingress execute() throws ApiException { ApiResponse localVarResp = readNamespacedIngressStatusWithHttpInfo(name, namespace, pretty); return localVarResp.getData(); } /** * Execute readNamespacedIngressStatus request with HTTP info returned * @return ApiResponse<V1Ingress> * @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 readNamespacedIngressStatusWithHttpInfo(name, namespace, pretty); } /** * Execute readNamespacedIngressStatus 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 readNamespacedIngressStatusAsync(name, namespace, pretty, _callback); } } /** * * read status of the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIreadNamespacedIngressStatusRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadNamespacedIngressStatusRequest readNamespacedIngressStatus(String name, String namespace) { return new APIreadNamespacedIngressStatusRequest(name, namespace); } private okhttp3.Call readNamespacedNetworkPolicyCall(String name, String namespace, 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/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 readNamespacedNetworkPolicyValidateBeforeCall(String name, String namespace, 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 readNamespacedNetworkPolicy(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling readNamespacedNetworkPolicy(Async)"); } return readNamespacedNetworkPolicyCall(name, namespace, pretty, _callback); } private ApiResponse readNamespacedNetworkPolicyWithHttpInfo(String name, String namespace, String pretty) throws ApiException { okhttp3.Call localVarCall = readNamespacedNetworkPolicyValidateBeforeCall(name, namespace, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readNamespacedNetworkPolicyAsync(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readNamespacedNetworkPolicyValidateBeforeCall(name, namespace, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadNamespacedNetworkPolicyRequest { private final String name; private final String namespace; private String pretty; private APIreadNamespacedNetworkPolicyRequest(String name, String namespace) { this.name = name; this.namespace = namespace; } /** * 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 APIreadNamespacedNetworkPolicyRequest */ public APIreadNamespacedNetworkPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readNamespacedNetworkPolicy * @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 readNamespacedNetworkPolicyCall(name, namespace, pretty, _callback); } /** * Execute readNamespacedNetworkPolicy request * @return V1NetworkPolicy * @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 V1NetworkPolicy execute() throws ApiException { ApiResponse localVarResp = readNamespacedNetworkPolicyWithHttpInfo(name, namespace, pretty); return localVarResp.getData(); } /** * Execute readNamespacedNetworkPolicy request with HTTP info returned * @return ApiResponse<V1NetworkPolicy> * @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 readNamespacedNetworkPolicyWithHttpInfo(name, namespace, pretty); } /** * Execute readNamespacedNetworkPolicy 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 readNamespacedNetworkPolicyAsync(name, namespace, pretty, _callback); } } /** * * read the specified NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIreadNamespacedNetworkPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadNamespacedNetworkPolicyRequest readNamespacedNetworkPolicy(String name, String namespace) { return new APIreadNamespacedNetworkPolicyRequest(name, namespace); } private okhttp3.Call replaceIngressClassCall(String name, V1IngressClass 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/networking.k8s.io/v1/ingressclasses/{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 replaceIngressClassValidateBeforeCall(String name, V1IngressClass 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 replaceIngressClass(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceIngressClass(Async)"); } return replaceIngressClassCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceIngressClassWithHttpInfo(String name, V1IngressClass body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceIngressClassValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceIngressClassAsync(String name, V1IngressClass body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceIngressClassValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceIngressClassRequest { private final String name; private final V1IngressClass body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceIngressClassRequest(String name, V1IngressClass 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 APIreplaceIngressClassRequest */ public APIreplaceIngressClassRequest 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 APIreplaceIngressClassRequest */ public APIreplaceIngressClassRequest 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 APIreplaceIngressClassRequest */ public APIreplaceIngressClassRequest 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 APIreplaceIngressClassRequest */ public APIreplaceIngressClassRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceIngressClass * @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 replaceIngressClassCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceIngressClass request * @return V1IngressClass * @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 V1IngressClass execute() throws ApiException { ApiResponse localVarResp = replaceIngressClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceIngressClass request with HTTP info returned * @return ApiResponse<V1IngressClass> * @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 replaceIngressClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceIngressClass 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 replaceIngressClassAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace the specified IngressClass * @param name name of the IngressClass (required) * @param body (required) * @return APIreplaceIngressClassRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceIngressClassRequest replaceIngressClass(String name, V1IngressClass body) { return new APIreplaceIngressClassRequest(name, body); } private okhttp3.Call replaceNamespacedIngressCall(String name, String namespace, V1Ingress 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 replaceNamespacedIngressValidateBeforeCall(String name, String namespace, V1Ingress 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 replaceNamespacedIngress(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling replaceNamespacedIngress(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceNamespacedIngress(Async)"); } return replaceNamespacedIngressCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceNamespacedIngressWithHttpInfo(String name, String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceNamespacedIngressValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceNamespacedIngressAsync(String name, String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceNamespacedIngressValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceNamespacedIngressRequest { private final String name; private final String namespace; private final V1Ingress body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceNamespacedIngressRequest(String name, String namespace, V1Ingress body) { this.name = name; this.namespace = namespace; 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 APIreplaceNamespacedIngressRequest */ public APIreplaceNamespacedIngressRequest 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 APIreplaceNamespacedIngressRequest */ public APIreplaceNamespacedIngressRequest 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 APIreplaceNamespacedIngressRequest */ public APIreplaceNamespacedIngressRequest 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 APIreplaceNamespacedIngressRequest */ public APIreplaceNamespacedIngressRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceNamespacedIngress * @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 replaceNamespacedIngressCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceNamespacedIngress request * @return V1Ingress * @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 V1Ingress execute() throws ApiException { ApiResponse localVarResp = replaceNamespacedIngressWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceNamespacedIngress request with HTTP info returned * @return ApiResponse<V1Ingress> * @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 replaceNamespacedIngressWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceNamespacedIngress 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 replaceNamespacedIngressAsync(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIreplaceNamespacedIngressRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceNamespacedIngressRequest replaceNamespacedIngress(String name, String namespace, V1Ingress body) { return new APIreplaceNamespacedIngressRequest(name, namespace, body); } private okhttp3.Call replaceNamespacedIngressStatusCall(String name, String namespace, V1Ingress 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/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 replaceNamespacedIngressStatusValidateBeforeCall(String name, String namespace, V1Ingress 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 replaceNamespacedIngressStatus(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling replaceNamespacedIngressStatus(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceNamespacedIngressStatus(Async)"); } return replaceNamespacedIngressStatusCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceNamespacedIngressStatusWithHttpInfo(String name, String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceNamespacedIngressStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceNamespacedIngressStatusAsync(String name, String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceNamespacedIngressStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceNamespacedIngressStatusRequest { private final String name; private final String namespace; private final V1Ingress body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceNamespacedIngressStatusRequest(String name, String namespace, V1Ingress body) { this.name = name; this.namespace = namespace; 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 APIreplaceNamespacedIngressStatusRequest */ public APIreplaceNamespacedIngressStatusRequest 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 APIreplaceNamespacedIngressStatusRequest */ public APIreplaceNamespacedIngressStatusRequest 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 APIreplaceNamespacedIngressStatusRequest */ public APIreplaceNamespacedIngressStatusRequest 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 APIreplaceNamespacedIngressStatusRequest */ public APIreplaceNamespacedIngressStatusRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceNamespacedIngressStatus * @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 replaceNamespacedIngressStatusCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceNamespacedIngressStatus request * @return V1Ingress * @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 V1Ingress execute() throws ApiException { ApiResponse localVarResp = replaceNamespacedIngressStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceNamespacedIngressStatus request with HTTP info returned * @return ApiResponse<V1Ingress> * @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 replaceNamespacedIngressStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceNamespacedIngressStatus 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 replaceNamespacedIngressStatusAsync(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace status of the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIreplaceNamespacedIngressStatusRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceNamespacedIngressStatusRequest replaceNamespacedIngressStatus(String name, String namespace, V1Ingress body) { return new APIreplaceNamespacedIngressStatusRequest(name, namespace, body); } private okhttp3.Call replaceNamespacedNetworkPolicyCall(String name, String namespace, V1NetworkPolicy 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/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())) .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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 replaceNamespacedNetworkPolicyValidateBeforeCall(String name, String namespace, V1NetworkPolicy 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 replaceNamespacedNetworkPolicy(Async)"); } // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling replaceNamespacedNetworkPolicy(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceNamespacedNetworkPolicy(Async)"); } return replaceNamespacedNetworkPolicyCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceNamespacedNetworkPolicyWithHttpInfo(String name, String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceNamespacedNetworkPolicyValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceNamespacedNetworkPolicyAsync(String name, String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceNamespacedNetworkPolicyValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceNamespacedNetworkPolicyRequest { private final String name; private final String namespace; private final V1NetworkPolicy body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceNamespacedNetworkPolicyRequest(String name, String namespace, V1NetworkPolicy body) { this.name = name; this.namespace = namespace; 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 APIreplaceNamespacedNetworkPolicyRequest */ public APIreplaceNamespacedNetworkPolicyRequest 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 APIreplaceNamespacedNetworkPolicyRequest */ public APIreplaceNamespacedNetworkPolicyRequest 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 APIreplaceNamespacedNetworkPolicyRequest */ public APIreplaceNamespacedNetworkPolicyRequest 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 APIreplaceNamespacedNetworkPolicyRequest */ public APIreplaceNamespacedNetworkPolicyRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceNamespacedNetworkPolicy * @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 replaceNamespacedNetworkPolicyCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceNamespacedNetworkPolicy request * @return V1NetworkPolicy * @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 V1NetworkPolicy execute() throws ApiException { ApiResponse localVarResp = replaceNamespacedNetworkPolicyWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceNamespacedNetworkPolicy request with HTTP info returned * @return ApiResponse<V1NetworkPolicy> * @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 replaceNamespacedNetworkPolicyWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceNamespacedNetworkPolicy 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 replaceNamespacedNetworkPolicyAsync(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace the specified NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) * @return APIreplaceNamespacedNetworkPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceNamespacedNetworkPolicyRequest replaceNamespacedNetworkPolicy(String name, String namespace, V1NetworkPolicy body) { return new APIreplaceNamespacedNetworkPolicyRequest(name, namespace, body); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy