queryParams, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
@@ -951,10 +1034,14 @@ public Request buildRequest(String path, String method, List queryParams,
reqBody = serialize(body, contentType);
}
+ // Associate callback with request (if not null) so interceptor can
+ // access it when creating ProgressResponseBody
+ reqBuilder.tag(callback);
+
Request request = null;
- if(progressRequestListener != null && reqBody != null) {
- ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener);
+ if (callback != null && reqBody != null) {
+ ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback);
request = reqBuilder.method(method, progressRequestBody).build();
} else {
request = reqBuilder.method(method, reqBody).build();
@@ -1033,13 +1120,15 @@ public void processHeaderParams(Map headerParams, Request.Builde
* Update query and header parameters based on authentication settings.
*
* @param authNames The authentications to apply
- * @param queryParams List of query parameters
- * @param headerParams Map of header parameters
+ * @param queryParams List of query parameters
+ * @param headerParams Map of header parameters
*/
public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
- if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
+ if (auth == null) {
+ throw new RuntimeException("Authentication undefined: " + authName);
+ }
auth.applyToParams(queryParams, headerParams);
}
}
@@ -1051,7 +1140,7 @@ public void updateParamsForAuth(String[] authNames, List queryParams, Map<
* @return RequestBody
*/
public RequestBody buildRequestBodyFormEncoding(Map formParams) {
- FormEncodingBuilder formBuilder = new FormEncodingBuilder();
+ okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder();
for (Entry param : formParams.entrySet()) {
formBuilder.add(param.getKey(), parameterToString(param.getValue()));
}
@@ -1066,7 +1155,7 @@ public RequestBody buildRequestBodyFormEncoding(Map formParams)
* @return RequestBody
*/
public RequestBody buildRequestBodyMultipart(Map formParams) {
- MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM);
+ MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM);
for (Entry param : formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
@@ -1096,6 +1185,27 @@ public String guessContentTypeFromFile(File file) {
}
}
+ /**
+ * Get network interceptor to add it to the httpClient to track download progress for
+ * async requests.
+ */
+ private Interceptor getProgressInterceptor() {
+ return new Interceptor() {
+ @Override
+ public Response intercept(Interceptor.Chain chain) throws IOException {
+ final Request request = chain.request();
+ final Response originalResponse = chain.proceed(request);
+ if (request.tag() instanceof ApiCallback) {
+ final ApiCallback callback = (ApiCallback) request.tag();
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), callback))
+ .build();
+ }
+ return originalResponse;
+ }
+ };
+ }
+
/**
* Apply SSL related settings to httpClient according to the current values of
* verifyingSsl and sslCaCert.
@@ -1105,19 +1215,28 @@ private void applySslSettings() {
TrustManager[] trustManagers = null;
HostnameVerifier hostnameVerifier = null;
if (!verifyingSsl) {
- TrustManager trustAll = new X509TrustManager() {
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
- @Override
- public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
- @Override
- public X509Certificate[] getAcceptedIssuers() { return null; }
+ trustManagers = new TrustManager[]{
+ new X509TrustManager() {
+ @Override
+ public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
+ }
+
+ @Override
+ public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
+ }
+
+ @Override
+ public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+ return new java.security.cert.X509Certificate[]{};
+ }
+ }
};
SSLContext sslContext = SSLContext.getInstance("TLS");
- trustManagers = new TrustManager[]{ trustAll };
hostnameVerifier = new HostnameVerifier() {
@Override
- public boolean verify(String hostname, SSLSession session) { return true; }
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
};
} else if (sslCaCert != null) {
char[] password = null; // Any password will work.
@@ -1140,11 +1259,12 @@ public void checkServerTrusted(X509Certificate[] chain, String authType) throws
if (keyManagers != null || trustManagers != null) {
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyManagers, trustManagers, new SecureRandom());
- httpClient.setSslSocketFactory(sslContext.getSocketFactory());
+ httpClient = httpClient.newBuilder().sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]).build();
} else {
- httpClient.setSslSocketFactory(null);
+ httpClient = httpClient.newBuilder().sslSocketFactory(null, (X509TrustManager) trustManagers[0]).build();
}
- httpClient.setHostnameVerifier(hostnameVerifier);
+
+ httpClient = httpClient.newBuilder().hostnameVerifier(hostnameVerifier).build();
} catch (GeneralSecurityException e) {
throw new RuntimeException(e);
}
diff --git a/kubernetes/src/main/java/io/kubernetes/client/ApiException.java b/kubernetes/src/main/java/io/kubernetes/client/ApiException.java
index 59b2f2ae48..1a7b1d29e2 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/ApiException.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/ApiException.java
@@ -1,12 +1,12 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
@@ -16,7 +16,7 @@
import java.util.Map;
import java.util.List;
-
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-10-22T00:42:19.661Z[Etc/UTC]")
public class ApiException extends Exception {
private int code = 0;
private Map> responseHeaders = null;
diff --git a/kubernetes/src/main/java/io/kubernetes/client/ApiResponse.java b/kubernetes/src/main/java/io/kubernetes/client/ApiResponse.java
index 8ebd46dc10..60e07834cc 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/ApiResponse.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/ApiResponse.java
@@ -1,12 +1,12 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/kubernetes/src/main/java/io/kubernetes/client/Configuration.java b/kubernetes/src/main/java/io/kubernetes/client/Configuration.java
index f6ebcac3b9..f30502066f 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/Configuration.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/Configuration.java
@@ -1,19 +1,19 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.kubernetes.client;
-
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-10-22T00:42:19.661Z[Etc/UTC]")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();
diff --git a/kubernetes/src/main/java/io/kubernetes/client/GzipRequestInterceptor.java b/kubernetes/src/main/java/io/kubernetes/client/GzipRequestInterceptor.java
index 532b39c6d2..3253f3031b 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/GzipRequestInterceptor.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/GzipRequestInterceptor.java
@@ -1,19 +1,19 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.kubernetes.client;
-import com.squareup.okhttp.*;
+import okhttp3.*;
import okio.Buffer;
import okio.BufferedSink;
import okio.GzipSink;
@@ -27,7 +27,8 @@
* Taken from https://github.com/square/okhttp/issues/350
*/
class GzipRequestInterceptor implements Interceptor {
- @Override public Response intercept(Chain chain) throws IOException {
+ @Override
+ public Response intercept(Chain chain) throws IOException {
Request originalRequest = chain.request();
if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
return chain.proceed(originalRequest);
@@ -63,19 +64,22 @@ public void writeTo(BufferedSink sink) throws IOException {
private RequestBody gzip(final RequestBody body) {
return new RequestBody() {
- @Override public MediaType contentType() {
+ @Override
+ public MediaType contentType() {
return body.contentType();
}
- @Override public long contentLength() {
+ @Override
+ public long contentLength() {
return -1; // We don't know the compressed length in advance!
}
- @Override public void writeTo(BufferedSink sink) throws IOException {
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
BufferedSink gzipSink = Okio.buffer(new GzipSink(sink));
body.writeTo(gzipSink);
gzipSink.close();
}
};
}
-}
\ No newline at end of file
+}
diff --git a/kubernetes/src/main/java/io/kubernetes/client/JSON.java b/kubernetes/src/main/java/io/kubernetes/client/JSON.java
index 99d8287a93..b79a7434d9 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/JSON.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/JSON.java
@@ -1,38 +1,47 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.6.9
+ * The version of the OpenAPI document: v1.15.6
+ *
*
- *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
+
package io.kubernetes.client;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapter;
+import com.google.gson.internal.bind.util.ISO8601Utils;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
-
-import okio.ByteString;
-
+import com.google.gson.JsonElement;
+import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.DateTimeFormatterBuilder;
import org.joda.time.format.ISODateTimeFormat;
+import io.kubernetes.client.models.*;
+import okio.ByteString;
+
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Type;
import java.text.DateFormat;
import java.text.ParseException;
+import java.text.ParsePosition;
import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+import java.util.HashMap;
public class JSON {
private Gson gson;
@@ -41,15 +50,38 @@ public class JSON {
private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
private DateTimeTypeAdapter dateTimeTypeAdapter = new DateTimeTypeAdapter();
private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
- private ByteArrayAdapter byteArrayTypeAdapter = new ByteArrayAdapter();
+ private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
+
+ public static GsonBuilder createGson() {
+ GsonFireBuilder fireBuilder = new GsonFireBuilder()
+ ;
+ GsonBuilder builder = fireBuilder.createGsonBuilder();
+ return builder;
+ }
+
+ private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
+ JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
+ if (null == element) {
+ throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
+ }
+ return element.getAsString();
+ }
+
+ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
+ Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase(Locale.ROOT));
+ if (null == clazz) {
+ throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
+ }
+ return clazz;
+ }
public JSON() {
- gson = new GsonBuilder()
+ gson = createGson()
.registerTypeAdapter(Date.class, dateTypeAdapter)
.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
.registerTypeAdapter(DateTime.class, dateTimeTypeAdapter)
.registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
- .registerTypeAdapter(byte[].class, byteArrayTypeAdapter)
+ .registerTypeAdapter(byte[].class, byteArrayAdapter)
.create();
}
@@ -110,40 +142,38 @@ public T deserialize(String body, Type returnType) {
} catch (JsonParseException e) {
// Fallback processing when failed to parse JSON form response body:
// return the response body string directly for the String return type;
- if (returnType.equals(String.class))
+ if (returnType.equals(String.class)) {
return (T) body;
- else
+ } else {
throw (e);
+ }
}
}
/**
- + * Gson TypeAdapter for Byte Array type
- + */
+ * Gson TypeAdapter for Byte Array type
+ */
public class ByteArrayAdapter extends TypeAdapter {
@Override
public void write(JsonWriter out, byte[] value) throws IOException {
- boolean oldHtmlSafe = out.isHtmlSafe();
- out.setHtmlSafe(false);
if (value == null) {
out.nullValue();
} else {
out.value(ByteString.of(value).base64());
}
- out.setHtmlSafe(oldHtmlSafe);
}
@Override
public byte[] read(JsonReader in) throws IOException {
switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String bytesAsBase64 = in.nextString();
- ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
- return byteString.toByteArray();
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String bytesAsBase64 = in.nextString();
+ ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
+ return byteString.toByteArray();
}
}
}
@@ -156,8 +186,9 @@ public static class DateTimeTypeAdapter extends TypeAdapter {
private DateTimeFormatter formatter;
public DateTimeTypeAdapter() {
- this(new DateTimeFormatterBuilder().append(ISODateTimeFormat.dateTime().getPrinter(),
- ISODateTimeFormat.dateOptionalTimeParser().getParser()).toFormatter());
+ this(new DateTimeFormatterBuilder()
+ .append(ISODateTimeFormat.dateTime().getPrinter(), ISODateTimeFormat.dateOptionalTimeParser().getParser())
+ .toFormatter());
}
public DateTimeTypeAdapter(DateTimeFormatter formatter) {
@@ -180,12 +211,12 @@ public void write(JsonWriter out, DateTime date) throws IOException {
@Override
public DateTime read(JsonReader in) throws IOException {
switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- return formatter.parseDateTime(date);
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ return formatter.parseDateTime(date);
}
}
}
@@ -221,12 +252,12 @@ public void write(JsonWriter out, LocalDate date) throws IOException {
@Override
public LocalDate read(JsonReader in) throws IOException {
switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- return formatter.parseLocalDate(date);
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ return formatter.parseLocalDate(date);
}
}
}
@@ -250,8 +281,7 @@ public static class SqlDateTypeAdapter extends TypeAdapter {
private DateFormat dateFormat;
- public SqlDateTypeAdapter() {
- }
+ public SqlDateTypeAdapter() {}
public SqlDateTypeAdapter(DateFormat dateFormat) {
this.dateFormat = dateFormat;
@@ -279,19 +309,19 @@ public void write(JsonWriter out, java.sql.Date date) throws IOException {
@Override
public java.sql.Date read(JsonReader in) throws IOException {
switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- try {
- if (dateFormat != null) {
- return new java.sql.Date(dateFormat.parse(date).getTime());
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return new java.sql.Date(dateFormat.parse(date).getTime());
+ }
+ return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
}
- return new java.sql.Date(ISODateTimeFormat.basicDateTime().parseMillis(date));
- } catch (ParseException e) {
- throw new JsonParseException(e);
- }
}
}
}
@@ -304,8 +334,7 @@ public static class DateTypeAdapter extends TypeAdapter {
private DateFormat dateFormat;
- public DateTypeAdapter() {
- }
+ public DateTypeAdapter() {}
public DateTypeAdapter(DateFormat dateFormat) {
this.dateFormat = dateFormat;
@@ -324,7 +353,7 @@ public void write(JsonWriter out, Date date) throws IOException {
if (dateFormat != null) {
value = dateFormat.format(date);
} else {
- value = ISODateTimeFormat.basicDateTime().print(date.getTime());
+ value = ISO8601Utils.format(date, true);
}
out.value(value);
}
@@ -334,19 +363,19 @@ public void write(JsonWriter out, Date date) throws IOException {
public Date read(JsonReader in) throws IOException {
try {
switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- try {
- if (dateFormat != null) {
- return dateFormat.parse(date);
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return dateFormat.parse(date);
+ }
+ return ISO8601Utils.parse(date, new ParsePosition(0));
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
}
- return ISODateTimeFormat.basicDateTime().parseDateTime(date).toDate();
- } catch (ParseException e) {
- throw new JsonParseException(e);
- }
}
} catch (IllegalArgumentException e) {
throw new JsonParseException(e);
diff --git a/kubernetes/src/main/java/io/kubernetes/client/Pair.java b/kubernetes/src/main/java/io/kubernetes/client/Pair.java
index e9b896d9d8..71c88260de 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/Pair.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/Pair.java
@@ -1,19 +1,19 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.kubernetes.client;
-
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-10-22T00:42:19.661Z[Etc/UTC]")
public class Pair {
private String name = "";
private String value = "";
@@ -24,13 +24,17 @@ public Pair (String name, String value) {
}
private void setName(String name) {
- if (!isValidString(name)) return;
+ if (!isValidString(name)) {
+ return;
+ }
this.name = name;
}
private void setValue(String value) {
- if (!isValidString(value)) return;
+ if (!isValidString(value)) {
+ return;
+ }
this.value = value;
}
@@ -44,8 +48,13 @@ public String getValue() {
}
private boolean isValidString(String arg) {
- if (arg == null) return false;
- if (arg.trim().isEmpty()) return false;
+ if (arg == null) {
+ return false;
+ }
+
+ if (arg.trim().isEmpty()) {
+ return false;
+ }
return true;
}
diff --git a/kubernetes/src/main/java/io/kubernetes/client/ProgressRequestBody.java b/kubernetes/src/main/java/io/kubernetes/client/ProgressRequestBody.java
index 42cd07c8c5..e1a93fcf40 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/ProgressRequestBody.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/ProgressRequestBody.java
@@ -1,20 +1,20 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.kubernetes.client;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.RequestBody;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
import java.io.IOException;
@@ -26,17 +26,13 @@
public class ProgressRequestBody extends RequestBody {
- public interface ProgressRequestListener {
- void onRequestProgress(long bytesWritten, long contentLength, boolean done);
- }
-
private final RequestBody requestBody;
- private final ProgressRequestListener progressListener;
+ private final ApiCallback callback;
- public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
+ public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
this.requestBody = requestBody;
- this.progressListener = progressListener;
+ this.callback = callback;
}
@Override
@@ -70,7 +66,7 @@ public void write(Buffer source, long byteCount) throws IOException {
}
bytesWritten += byteCount;
- progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
+ callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
}
};
}
diff --git a/kubernetes/src/main/java/io/kubernetes/client/ProgressResponseBody.java b/kubernetes/src/main/java/io/kubernetes/client/ProgressResponseBody.java
index 8e629cd156..e7463fda04 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/ProgressResponseBody.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/ProgressResponseBody.java
@@ -1,20 +1,20 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.kubernetes.client;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.ResponseBody;
+import okhttp3.MediaType;
+import okhttp3.ResponseBody;
import java.io.IOException;
@@ -26,17 +26,13 @@
public class ProgressResponseBody extends ResponseBody {
- public interface ProgressListener {
- void update(long bytesRead, long contentLength, boolean done);
- }
-
private final ResponseBody responseBody;
- private final ProgressListener progressListener;
+ private final ApiCallback callback;
private BufferedSource bufferedSource;
- public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) {
+ public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
this.responseBody = responseBody;
- this.progressListener = progressListener;
+ this.callback = callback;
}
@Override
@@ -45,12 +41,12 @@ public MediaType contentType() {
}
@Override
- public long contentLength() throws IOException {
+ public long contentLength() {
return responseBody.contentLength();
}
@Override
- public BufferedSource source() throws IOException {
+ public BufferedSource source() {
if (bufferedSource == null) {
bufferedSource = Okio.buffer(source(responseBody.source()));
}
@@ -66,7 +62,7 @@ public long read(Buffer sink, long byteCount) throws IOException {
long bytesRead = super.read(sink, byteCount);
// read() returns the number of bytes read, or -1 if this source is exhausted.
totalBytesRead += bytesRead != -1 ? bytesRead : 0;
- progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
+ callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
return bytesRead;
}
};
diff --git a/kubernetes/src/main/java/io/kubernetes/client/StringUtil.java b/kubernetes/src/main/java/io/kubernetes/client/StringUtil.java
index 5231849d11..8ac56c8291 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/StringUtil.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/StringUtil.java
@@ -1,19 +1,19 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.kubernetes.client;
-
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-10-22T00:42:19.661Z[Etc/UTC]")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
@@ -24,8 +24,12 @@ public class StringUtil {
*/
public static boolean containsIgnoreCase(String[] array, String value) {
for (String str : array) {
- if (value == null && str == null) return true;
- if (value != null && value.equalsIgnoreCase(str)) return true;
+ if (value == null && str == null) {
+ return true;
+ }
+ if (value != null && value.equalsIgnoreCase(str)) {
+ return true;
+ }
}
return false;
}
@@ -43,7 +47,9 @@ public static boolean containsIgnoreCase(String[] array, String value) {
*/
public static String join(String[] array, String separator) {
int len = array.length;
- if (len == 0) return "";
+ if (len == 0) {
+ return "";
+ }
StringBuilder out = new StringBuilder();
out.append(array[0]);
diff --git a/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationApi.java b/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationApi.java
index bf773b0c6c..2cca0f0993 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationApi.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationApi.java
@@ -1,12 +1,12 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
@@ -36,83 +36,71 @@
import java.util.Map;
public class AdmissionregistrationApi {
- private ApiClient apiClient;
+ private ApiClient localVarApiClient;
public AdmissionregistrationApi() {
this(Configuration.getDefaultApiClient());
}
public AdmissionregistrationApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
- return apiClient;
+ return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
/**
* Build call for getAPIGroup
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call getAPIGroupCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
-
Map localVarHeaderParams = new HashMap();
-
Map localVarFormParams = new HashMap();
-
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getAPIGroupValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
-
+ private okhttp3.Call getAPIGroupValidateBeforeCall(final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getAPIGroupCall(progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = getAPIGroupCall(_callback);
+ return localVarCall;
+
}
/**
@@ -120,10 +108,16 @@ private com.squareup.okhttp.Call getAPIGroupValidateBeforeCall(final ProgressRes
* get information of a group
* @return V1APIGroup
* @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 V1APIGroup getAPIGroup() throws ApiException {
- ApiResponse resp = getAPIGroupWithHttpInfo();
- return resp.getData();
+ ApiResponse localVarResp = getAPIGroupWithHttpInfo();
+ return localVarResp.getData();
}
/**
@@ -131,44 +125,37 @@ public V1APIGroup getAPIGroup() throws ApiException {
* get information of a group
* @return ApiResponse<V1APIGroup>
* @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 getAPIGroupWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = getAPIGroupValidateBeforeCall(null, null);
+ okhttp3.Call localVarCall = getAPIGroupValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* get information of a group
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getAPIGroupAsync(final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getAPIGroupAsync(final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getAPIGroupValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getAPIGroupValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
}
diff --git a/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationV1beta1Api.java b/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationV1beta1Api.java
index a365b7e1b0..ac6377f047 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationV1beta1Api.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/apis/AdmissionregistrationV1beta1Api.java
@@ -1,12 +1,12 @@
/*
* Kubernetes
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * OpenAPI spec version: v1.14.2
+ * The version of the OpenAPI document: v1.15.6
*
*
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
* Do not edit the class manually.
*/
@@ -29,7 +29,6 @@
import io.kubernetes.client.models.V1APIResourceList;
import io.kubernetes.client.models.V1DeleteOptions;
-import io.kubernetes.client.custom.V1Patch;
import io.kubernetes.client.models.V1Status;
import io.kubernetes.client.models.V1beta1MutatingWebhookConfiguration;
import io.kubernetes.client.models.V1beta1MutatingWebhookConfigurationList;
@@ -43,22 +42,22 @@
import java.util.Map;
public class AdmissionregistrationV1beta1Api {
- private ApiClient apiClient;
+ private ApiClient localVarApiClient;
public AdmissionregistrationV1beta1Api() {
this(Configuration.getDefaultApiClient());
}
public AdmissionregistrationV1beta1Api(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
- return apiClient;
+ return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
/**
@@ -67,74 +66,70 @@ public void setApiClient(ApiClient apiClient) {
* @param pretty If 'true', then the output is pretty printed. (optional)
* @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)
* @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)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call createMutatingWebhookConfigurationCall(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call createMutatingWebhookConfigurationCall(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = body;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (dryRun != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("dryRun", dryRun));
- if (fieldManager != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fieldManager", fieldManager));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (dryRun != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun));
+ }
- Map localVarFormParams = new HashMap();
+ if (fieldManager != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager));
+ }
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call createMutatingWebhookConfigurationValidateBeforeCall(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call createMutatingWebhookConfigurationValidateBeforeCall(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createMutatingWebhookConfiguration(Async)");
}
-
- com.squareup.okhttp.Call call = createMutatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = createMutatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, _callback);
+ return localVarCall;
+
}
/**
@@ -146,10 +141,18 @@ private com.squareup.okhttp.Call createMutatingWebhookConfigurationValidateBefor
* @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 V1beta1MutatingWebhookConfiguration
* @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 V1beta1MutatingWebhookConfiguration createMutatingWebhookConfiguration(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager) throws ApiException {
- ApiResponse resp = createMutatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager);
- return resp.getData();
+ ApiResponse localVarResp = createMutatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager);
+ return localVarResp.getData();
}
/**
@@ -161,11 +164,19 @@ public V1beta1MutatingWebhookConfiguration createMutatingWebhookConfiguration(V1
* @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 ApiResponse<V1beta1MutatingWebhookConfiguration>
* @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 createMutatingWebhookConfigurationWithHttpInfo(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager) throws ApiException {
- com.squareup.okhttp.Call call = createMutatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, null, null);
+ okhttp3.Call localVarCall = createMutatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
@@ -175,35 +186,24 @@ public ApiResponse createMutatingWebhookCon
* @param pretty If 'true', then the output is pretty printed. (optional)
* @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)
* @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)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call createMutatingWebhookConfigurationAsync(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call createMutatingWebhookConfigurationAsync(V1beta1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = createMutatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = createMutatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for createValidatingWebhookConfiguration
@@ -211,74 +211,70 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @param pretty If 'true', then the output is pretty printed. (optional)
* @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)
* @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)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call createValidatingWebhookConfigurationCall(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call createValidatingWebhookConfigurationCall(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = body;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (dryRun != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("dryRun", dryRun));
- if (fieldManager != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fieldManager", fieldManager));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (dryRun != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun));
+ }
- Map localVarFormParams = new HashMap();
+ if (fieldManager != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager));
+ }
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call createValidatingWebhookConfigurationValidateBeforeCall(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call createValidatingWebhookConfigurationValidateBeforeCall(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createValidatingWebhookConfiguration(Async)");
}
-
- com.squareup.okhttp.Call call = createValidatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = createValidatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, _callback);
+ return localVarCall;
+
}
/**
@@ -290,10 +286,18 @@ private com.squareup.okhttp.Call createValidatingWebhookConfigurationValidateBef
* @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 V1beta1ValidatingWebhookConfiguration
* @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 V1beta1ValidatingWebhookConfiguration createValidatingWebhookConfiguration(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager) throws ApiException {
- ApiResponse resp = createValidatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager);
- return resp.getData();
+ ApiResponse localVarResp = createValidatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager);
+ return localVarResp.getData();
}
/**
@@ -305,11 +309,19 @@ public V1beta1ValidatingWebhookConfiguration createValidatingWebhookConfiguratio
* @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 ApiResponse<V1beta1ValidatingWebhookConfiguration>
* @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 createValidatingWebhookConfigurationWithHttpInfo(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager) throws ApiException {
- com.squareup.okhttp.Call call = createValidatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, null, null);
+ okhttp3.Call localVarCall = createValidatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
@@ -319,448 +331,530 @@ public ApiResponse createValidatingWebhoo
* @param pretty If 'true', then the output is pretty printed. (optional)
* @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)
* @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)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call createValidatingWebhookConfigurationAsync(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call createValidatingWebhookConfigurationAsync(V1beta1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = createValidatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = createValidatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for deleteCollectionMutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param body (optional)
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call deleteCollectionMutatingWebhookConfigurationCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
+ public okhttp3.Call deleteCollectionMutatingWebhookConfigurationCall(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = body;
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (_continue != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("continue", _continue));
- if (fieldSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fieldSelector", fieldSelector));
- if (labelSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("labelSelector", labelSelector));
- if (limit != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
- if (resourceVersion != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("resourceVersion", resourceVersion));
- if (timeoutSeconds != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
- if (watch != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("watch", watch));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (allowWatchBookmarks != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks));
+ }
- Map localVarFormParams = new HashMap();
+ 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 (timeoutSeconds != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
+ }
+
+ if (watch != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch));
+ }
+
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
-
+ private okhttp3.Call deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = deleteCollectionMutatingWebhookConfigurationCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = deleteCollectionMutatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body, _callback);
+ return localVarCall;
+
}
/**
*
* delete collection of MutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
+ * @param body (optional)
* @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 deleteCollectionMutatingWebhookConfiguration(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- ApiResponse resp = deleteCollectionMutatingWebhookConfigurationWithHttpInfo(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch);
- return resp.getData();
+ public V1Status deleteCollectionMutatingWebhookConfiguration(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body) throws ApiException {
+ ApiResponse localVarResp = deleteCollectionMutatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body);
+ return localVarResp.getData();
}
/**
*
* delete collection of MutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
+ * @param body (optional)
* @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 deleteCollectionMutatingWebhookConfigurationWithHttpInfo(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- com.squareup.okhttp.Call call = deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, null, null);
+ public ApiResponse deleteCollectionMutatingWebhookConfigurationWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body) throws ApiException {
+ okhttp3.Call localVarCall = deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* delete collection of MutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param callback The callback to be executed when the API call finishes
+ * @param body (optional)
+ * @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 com.squareup.okhttp.Call deleteCollectionMutatingWebhookConfigurationAsync(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
+ public okhttp3.Call deleteCollectionMutatingWebhookConfigurationAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for deleteCollectionValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param body (optional)
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call deleteCollectionValidatingWebhookConfigurationCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
+ public okhttp3.Call deleteCollectionValidatingWebhookConfigurationCall(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = body;
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (_continue != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("continue", _continue));
- if (fieldSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fieldSelector", fieldSelector));
- if (labelSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("labelSelector", labelSelector));
- if (limit != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
- if (resourceVersion != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("resourceVersion", resourceVersion));
- if (timeoutSeconds != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
- if (watch != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("watch", watch));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (allowWatchBookmarks != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks));
+ }
- Map localVarFormParams = new HashMap();
+ 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 (timeoutSeconds != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
+ }
+
+ if (watch != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch));
+ }
+
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
-
+ private okhttp3.Call deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = deleteCollectionValidatingWebhookConfigurationCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = deleteCollectionValidatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body, _callback);
+ return localVarCall;
+
}
/**
*
* delete collection of ValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
+ * @param body (optional)
* @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 deleteCollectionValidatingWebhookConfiguration(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- ApiResponse resp = deleteCollectionValidatingWebhookConfigurationWithHttpInfo(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch);
- return resp.getData();
+ public V1Status deleteCollectionValidatingWebhookConfiguration(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body) throws ApiException {
+ ApiResponse localVarResp = deleteCollectionValidatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body);
+ return localVarResp.getData();
}
/**
*
* delete collection of ValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
+ * @param body (optional)
* @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 deleteCollectionValidatingWebhookConfigurationWithHttpInfo(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- com.squareup.okhttp.Call call = deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, null, null);
+ public ApiResponse deleteCollectionValidatingWebhookConfigurationWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body) throws ApiException {
+ okhttp3.Call localVarCall = deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* delete collection of ValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
+ * @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
+ * @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)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
* @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)
+ * @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)
+ * @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)
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param callback The callback to be executed when the API call finishes
+ * @param body (optional)
+ * @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 com.squareup.okhttp.Call deleteCollectionValidatingWebhookConfigurationAsync(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+ public okhttp3.Call deleteCollectionValidatingWebhookConfigurationAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, Integer timeoutSeconds, Boolean watch, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, timeoutSeconds, watch, body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for deleteMutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param body (optional)
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call deleteMutatingWebhookConfigurationCall(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call deleteMutatingWebhookConfigurationCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = body;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}"
- .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
+ .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (dryRun != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("dryRun", dryRun));
- if (gracePeriodSeconds != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds));
- if (orphanDependents != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("orphanDependents", orphanDependents));
- if (propagationPolicy != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("propagationPolicy", propagationPolicy));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (dryRun != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun));
+ }
- Map localVarFormParams = new HashMap();
+ 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));
+ }
+
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call deleteMutatingWebhookConfigurationValidateBeforeCall(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call deleteMutatingWebhookConfigurationValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling deleteMutatingWebhookConfiguration(Async)");
}
-
- com.squareup.okhttp.Call call = deleteMutatingWebhookConfigurationCall(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = deleteMutatingWebhookConfigurationCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
+ return localVarCall;
+
}
/**
@@ -768,17 +862,24 @@ private com.squareup.okhttp.Call deleteMutatingWebhookConfigurationValidateBefor
* delete a MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
+ * @param body (optional)
* @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 deleteMutatingWebhookConfiguration(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy) throws ApiException {
- ApiResponse resp = deleteMutatingWebhookConfigurationWithHttpInfo(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy);
- return resp.getData();
+ public V1Status deleteMutatingWebhookConfiguration(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException {
+ ApiResponse localVarResp = deleteMutatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body);
+ return localVarResp.getData();
}
/**
@@ -786,18 +887,25 @@ public V1Status deleteMutatingWebhookConfiguration(String name, String pretty, V
* delete a MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
+ * @param body (optional)
* @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 deleteMutatingWebhookConfigurationWithHttpInfo(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy) throws ApiException {
- com.squareup.okhttp.Call call = deleteMutatingWebhookConfigurationValidateBeforeCall(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, null, null);
+ public ApiResponse deleteMutatingWebhookConfigurationWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException {
+ okhttp3.Call localVarCall = deleteMutatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
@@ -805,123 +913,110 @@ public ApiResponse deleteMutatingWebhookConfigurationWithHttpInfo(Stri
* delete a MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
- * @param callback The callback to be executed when the API call finishes
+ * @param body (optional)
+ * @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 com.squareup.okhttp.Call deleteMutatingWebhookConfigurationAsync(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ApiCallback callback) throws ApiException {
+ public okhttp3.Call deleteMutatingWebhookConfigurationAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = deleteMutatingWebhookConfigurationValidateBeforeCall(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = deleteMutatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for deleteValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param body (optional)
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call deleteValidatingWebhookConfigurationCall(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call deleteValidatingWebhookConfigurationCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = body;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}"
- .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
+ .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (dryRun != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("dryRun", dryRun));
- if (gracePeriodSeconds != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds));
- if (orphanDependents != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("orphanDependents", orphanDependents));
- if (propagationPolicy != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("propagationPolicy", propagationPolicy));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (dryRun != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun));
+ }
- Map localVarFormParams = new HashMap();
+ 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));
+ }
+
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call deleteValidatingWebhookConfigurationValidateBeforeCall(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call deleteValidatingWebhookConfigurationValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling deleteValidatingWebhookConfiguration(Async)");
}
-
- com.squareup.okhttp.Call call = deleteValidatingWebhookConfigurationCall(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = deleteValidatingWebhookConfigurationCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
+ return localVarCall;
+
}
/**
@@ -929,17 +1024,24 @@ private com.squareup.okhttp.Call deleteValidatingWebhookConfigurationValidateBef
* delete a ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
+ * @param body (optional)
* @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 deleteValidatingWebhookConfiguration(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy) throws ApiException {
- ApiResponse resp = deleteValidatingWebhookConfigurationWithHttpInfo(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy);
- return resp.getData();
+ public V1Status deleteValidatingWebhookConfiguration(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException {
+ ApiResponse localVarResp = deleteValidatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body);
+ return localVarResp.getData();
}
/**
@@ -947,18 +1049,25 @@ public V1Status deleteValidatingWebhookConfiguration(String name, String pretty,
* delete a ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
+ * @param body (optional)
* @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 deleteValidatingWebhookConfigurationWithHttpInfo(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy) throws ApiException {
- com.squareup.okhttp.Call call = deleteValidatingWebhookConfigurationValidateBeforeCall(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, null, null);
+ public ApiResponse deleteValidatingWebhookConfigurationWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException {
+ okhttp3.Call localVarCall = deleteValidatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
@@ -966,100 +1075,76 @@ public ApiResponse deleteValidatingWebhookConfigurationWithHttpInfo(St
* delete a ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
- * @param body (optional)
* @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)
* @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)
* @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)
* @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)
- * @param callback The callback to be executed when the API call finishes
+ * @param body (optional)
+ * @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 com.squareup.okhttp.Call deleteValidatingWebhookConfigurationAsync(String name, String pretty, V1DeleteOptions body, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+ public okhttp3.Call deleteValidatingWebhookConfigurationAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = deleteValidatingWebhookConfigurationValidateBeforeCall(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = deleteValidatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getAPIResources
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call getAPIResourcesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call getAPIResourcesCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
-
Map localVarHeaderParams = new HashMap();
-
Map localVarFormParams = new HashMap();
-
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "application/json", "application/yaml", "application/vnd.kubernetes.protobuf"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getAPIResourcesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getAPIResourcesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
-
- com.squareup.okhttp.Call call = getAPIResourcesCall(progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = getAPIResourcesCall(_callback);
+ return localVarCall;
+
}
/**
@@ -1067,10 +1152,16 @@ private com.squareup.okhttp.Call getAPIResourcesValidateBeforeCall(final Progres
* get available resources
* @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 getAPIResources() throws ApiException {
- ApiResponse resp = getAPIResourcesWithHttpInfo();
- return resp.getData();
+ ApiResponse localVarResp = getAPIResourcesWithHttpInfo();
+ return localVarResp.getData();
}
/**
@@ -1078,49 +1169,43 @@ public V1APIResourceList getAPIResources() throws ApiException {
* get available resources
* @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 getAPIResourcesWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = getAPIResourcesValidateBeforeCall(null, null);
+ okhttp3.Call localVarCall = getAPIResourcesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* get available resources
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getAPIResourcesAsync(final ApiCallback callback) throws ApiException {
+ public okhttp3.Call getAPIResourcesAsync(final ApiCallback _callback) throws ApiException {
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = getAPIResourcesValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getAPIResourcesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for listMutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1128,85 +1213,94 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call listMutatingWebhookConfigurationCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call listMutatingWebhookConfigurationCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (_continue != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("continue", _continue));
- if (fieldSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fieldSelector", fieldSelector));
- if (labelSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("labelSelector", labelSelector));
- if (limit != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
- if (resourceVersion != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("resourceVersion", resourceVersion));
- if (timeoutSeconds != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
- if (watch != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("watch", watch));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (allowWatchBookmarks != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks));
+ }
- Map localVarFormParams = new HashMap();
+ 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 (timeoutSeconds != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
+ }
+
+ if (watch != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch));
+ }
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call listMutatingWebhookConfigurationValidateBeforeCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
-
+ private okhttp3.Call listMutatingWebhookConfigurationValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = listMutatingWebhookConfigurationCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = listMutatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, _callback);
+ return localVarCall;
+
}
/**
*
* list or watch objects of kind MutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1216,16 +1310,23 @@ private com.squareup.okhttp.Call listMutatingWebhookConfigurationValidateBeforeC
* @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 V1beta1MutatingWebhookConfigurationList
* @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 V1beta1MutatingWebhookConfigurationList listMutatingWebhookConfiguration(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- ApiResponse resp = listMutatingWebhookConfigurationWithHttpInfo(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch);
- return resp.getData();
+ public V1beta1MutatingWebhookConfigurationList listMutatingWebhookConfiguration(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
+ ApiResponse localVarResp = listMutatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch);
+ return localVarResp.getData();
}
/**
*
* list or watch objects of kind MutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1235,17 +1336,24 @@ public V1beta1MutatingWebhookConfigurationList listMutatingWebhookConfiguration(
* @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 ApiResponse<V1beta1MutatingWebhookConfigurationList>
* @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 listMutatingWebhookConfigurationWithHttpInfo(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- com.squareup.okhttp.Call call = listMutatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, null, null);
+ public ApiResponse listMutatingWebhookConfigurationWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
+ okhttp3.Call localVarCall = listMutatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* list or watch objects of kind MutatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1253,39 +1361,27 @@ public ApiResponse listMutatingWebhookC
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call listMutatingWebhookConfigurationAsync(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
+ public okhttp3.Call listMutatingWebhookConfigurationAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException {
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = listMutatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = listMutatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for listValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1293,85 +1389,94 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call listValidatingWebhookConfigurationCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call listValidatingWebhookConfigurationCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (_continue != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("continue", _continue));
- if (fieldSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fieldSelector", fieldSelector));
- if (labelSelector != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("labelSelector", labelSelector));
- if (limit != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
- if (resourceVersion != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("resourceVersion", resourceVersion));
- if (timeoutSeconds != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
- if (watch != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("watch", watch));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (allowWatchBookmarks != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks));
+ }
- Map localVarFormParams = new HashMap();
+ 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 (timeoutSeconds != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds));
+ }
+
+ if (watch != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch));
+ }
+
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
final String[] localVarContentTypes = {
- "*/*"
+
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { "BearerToken" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
-
+
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call listValidatingWebhookConfigurationValidateBeforeCall(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call listValidatingWebhookConfigurationValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException {
-
- com.squareup.okhttp.Call call = listValidatingWebhookConfigurationCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
- return call;
-
-
-
-
+ okhttp3.Call localVarCall = listValidatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, _callback);
+ return localVarCall;
+
}
/**
*
* list or watch objects of kind ValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1381,16 +1486,23 @@ private com.squareup.okhttp.Call listValidatingWebhookConfigurationValidateBefor
* @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 V1beta1ValidatingWebhookConfigurationList
* @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 V1beta1ValidatingWebhookConfigurationList listValidatingWebhookConfiguration(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- ApiResponse resp = listValidatingWebhookConfigurationWithHttpInfo(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch);
- return resp.getData();
+ public V1beta1ValidatingWebhookConfigurationList listValidatingWebhookConfiguration(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
+ ApiResponse localVarResp = listValidatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch);
+ return localVarResp.getData();
}
/**
*
* list or watch objects of kind ValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1400,17 +1512,24 @@ public V1beta1ValidatingWebhookConfigurationList listValidatingWebhookConfigurat
* @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 ApiResponse<V1beta1ValidatingWebhookConfigurationList>
* @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 listValidatingWebhookConfigurationWithHttpInfo(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
- com.squareup.okhttp.Call call = listValidatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, null, null);
+ public ApiResponse listValidatingWebhookConfigurationWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch) throws ApiException {
+ okhttp3.Call localVarCall = listValidatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* list or watch objects of kind ValidatingWebhookConfiguration
* @param pretty If 'true', then the output is pretty printed. (optional)
+ * @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. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. This field is alpha and can be changed or removed without notice. (optional)
* @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)
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
@@ -1418,35 +1537,22 @@ public ApiResponse listValidatingWebh
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. (optional)
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional)
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call listValidatingWebhookConfigurationAsync(String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+ public okhttp3.Call listValidatingWebhookConfigurationAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException {
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = listValidatingWebhookConfigurationValidateBeforeCall(pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = listValidatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for patchMutatingWebhookConfiguration
@@ -1456,63 +1562,63 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @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)
* @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)
* @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)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @param _callback Callback for upload/download progress
* @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 com.squareup.okhttp.Call patchMutatingWebhookConfigurationCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, Boolean force, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call patchMutatingWebhookConfigurationCall(String name, Object body, String pretty, String dryRun, String fieldManager, Boolean force, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = body;
-
+
// create path and map variables
String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}"
- .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
+ .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
- if (pretty != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
- if (dryRun != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("dryRun", dryRun));
- if (fieldManager != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fieldManager", fieldManager));
- if (force != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("force", force));
+ if (pretty != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
+ }
- Map localVarHeaderParams = new HashMap();
+ if (dryRun != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun));
+ }
- Map localVarFormParams = new HashMap