Skip to content

Commit 91e8eeb

Browse files
committed
Generate client with new templates from swagger-codegen head
1 parent 9549600 commit 91e8eeb

35 files changed

+7791
-2355
lines changed

kubernetes/src/main/java/io/kubernetes/client/ProgressRequestBody.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ public interface ProgressRequestListener {
3434

3535
private final ProgressRequestListener progressListener;
3636

37-
private BufferedSink bufferedSink;
38-
3937
public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
4038
this.requestBody = requestBody;
4139
this.progressListener = progressListener;
@@ -53,13 +51,9 @@ public long contentLength() throws IOException {
5351

5452
@Override
5553
public void writeTo(BufferedSink sink) throws IOException {
56-
if (bufferedSink == null) {
57-
bufferedSink = Okio.buffer(sink(sink));
58-
}
59-
54+
BufferedSink bufferedSink = Okio.buffer(sink(sink));
6055
requestBody.writeTo(bufferedSink);
6156
bufferedSink.flush();
62-
6357
}
6458

6559
private Sink sink(Sink sink) {

kubernetes/src/main/java/io/kubernetes/client/apis/ApisApi.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,18 @@ public void setApiClient(ApiClient apiClient) {
5454
this.apiClient = apiClient;
5555
}
5656

57-
/* Build call for getAPIVersions */
58-
private com.squareup.okhttp.Call getAPIVersionsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
57+
/**
58+
* Build call for getAPIVersions
59+
* @param progressListener Progress listener
60+
* @param progressRequestListener Progress request listener
61+
* @return Call to execute
62+
* @throws ApiException If fail to serialize the request body object
63+
*/
64+
public com.squareup.okhttp.Call getAPIVersionsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5965
Object localVarPostBody = null;
6066

6167
// create path and map variables
62-
String localVarPath = "/apis/".replaceAll("\\{format\\}","json");
68+
String localVarPath = "/apis/";
6369

6470
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6571

kubernetes/src/main/java/io/kubernetes/client/apis/AppsApi.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,18 @@ public void setApiClient(ApiClient apiClient) {
5454
this.apiClient = apiClient;
5555
}
5656

57-
/* Build call for getAPIGroup */
58-
private com.squareup.okhttp.Call getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
57+
/**
58+
* Build call for getAPIGroup
59+
* @param progressListener Progress listener
60+
* @param progressRequestListener Progress request listener
61+
* @return Call to execute
62+
* @throws ApiException If fail to serialize the request body object
63+
*/
64+
public com.squareup.okhttp.Call getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5965
Object localVarPostBody = null;
6066

6167
// create path and map variables
62-
String localVarPath = "/apis/apps/".replaceAll("\\{format\\}","json");
68+
String localVarPath = "/apis/apps/";
6369

6470
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6571

kubernetes/src/main/java/io/kubernetes/client/apis/AppsV1beta1Api.java

Lines changed: 408 additions & 123 deletions
Large diffs are not rendered by default.

kubernetes/src/main/java/io/kubernetes/client/apis/AuthenticationApi.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,18 @@ public void setApiClient(ApiClient apiClient) {
5454
this.apiClient = apiClient;
5555
}
5656

57-
/* Build call for getAPIGroup */
58-
private com.squareup.okhttp.Call getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
57+
/**
58+
* Build call for getAPIGroup
59+
* @param progressListener Progress listener
60+
* @param progressRequestListener Progress request listener
61+
* @return Call to execute
62+
* @throws ApiException If fail to serialize the request body object
63+
*/
64+
public com.squareup.okhttp.Call getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5965
Object localVarPostBody = null;
6066

6167
// create path and map variables
62-
String localVarPath = "/apis/authentication.k8s.io/".replaceAll("\\{format\\}","json");
68+
String localVarPath = "/apis/authentication.k8s.io/";
6369

6470
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6571

kubernetes/src/main/java/io/kubernetes/client/apis/AuthenticationV1Api.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,20 @@ public void setApiClient(ApiClient apiClient) {
5555
this.apiClient = apiClient;
5656
}
5757

58-
/* Build call for createTokenReview */
59-
private com.squareup.okhttp.Call createTokenReviewCall(V1TokenReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
58+
/**
59+
* Build call for createTokenReview
60+
* @param body (required)
61+
* @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
62+
* @param progressListener Progress listener
63+
* @param progressRequestListener Progress request listener
64+
* @return Call to execute
65+
* @throws ApiException If fail to serialize the request body object
66+
*/
67+
public com.squareup.okhttp.Call createTokenReviewCall(V1TokenReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
6068
Object localVarPostBody = body;
6169

6270
// create path and map variables
63-
String localVarPath = "/apis/authentication.k8s.io/v1/tokenreviews".replaceAll("\\{format\\}","json");
71+
String localVarPath = "/apis/authentication.k8s.io/v1/tokenreviews";
6472

6573
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6674
if (pretty != null)
@@ -178,12 +186,18 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
178186
apiClient.executeAsync(call, localVarReturnType, callback);
179187
return call;
180188
}
181-
/* Build call for getAPIResources */
182-
private com.squareup.okhttp.Call getAPIResourcesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
189+
/**
190+
* Build call for getAPIResources
191+
* @param progressListener Progress listener
192+
* @param progressRequestListener Progress request listener
193+
* @return Call to execute
194+
* @throws ApiException If fail to serialize the request body object
195+
*/
196+
public com.squareup.okhttp.Call getAPIResourcesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
183197
Object localVarPostBody = null;
184198

185199
// create path and map variables
186-
String localVarPath = "/apis/authentication.k8s.io/v1/".replaceAll("\\{format\\}","json");
200+
String localVarPath = "/apis/authentication.k8s.io/v1/";
187201

188202
List<Pair> localVarQueryParams = new ArrayList<Pair>();
189203

kubernetes/src/main/java/io/kubernetes/client/apis/AuthenticationV1beta1Api.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,20 @@ public void setApiClient(ApiClient apiClient) {
5555
this.apiClient = apiClient;
5656
}
5757

58-
/* Build call for createTokenReview */
59-
private com.squareup.okhttp.Call createTokenReviewCall(V1beta1TokenReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
58+
/**
59+
* Build call for createTokenReview
60+
* @param body (required)
61+
* @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
62+
* @param progressListener Progress listener
63+
* @param progressRequestListener Progress request listener
64+
* @return Call to execute
65+
* @throws ApiException If fail to serialize the request body object
66+
*/
67+
public com.squareup.okhttp.Call createTokenReviewCall(V1beta1TokenReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
6068
Object localVarPostBody = body;
6169

6270
// create path and map variables
63-
String localVarPath = "/apis/authentication.k8s.io/v1beta1/tokenreviews".replaceAll("\\{format\\}","json");
71+
String localVarPath = "/apis/authentication.k8s.io/v1beta1/tokenreviews";
6472

6573
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6674
if (pretty != null)
@@ -178,12 +186,18 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
178186
apiClient.executeAsync(call, localVarReturnType, callback);
179187
return call;
180188
}
181-
/* Build call for getAPIResources */
182-
private com.squareup.okhttp.Call getAPIResourcesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
189+
/**
190+
* Build call for getAPIResources
191+
* @param progressListener Progress listener
192+
* @param progressRequestListener Progress request listener
193+
* @return Call to execute
194+
* @throws ApiException If fail to serialize the request body object
195+
*/
196+
public com.squareup.okhttp.Call getAPIResourcesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
183197
Object localVarPostBody = null;
184198

185199
// create path and map variables
186-
String localVarPath = "/apis/authentication.k8s.io/v1beta1/".replaceAll("\\{format\\}","json");
200+
String localVarPath = "/apis/authentication.k8s.io/v1beta1/";
187201

188202
List<Pair> localVarQueryParams = new ArrayList<Pair>();
189203

kubernetes/src/main/java/io/kubernetes/client/apis/AuthorizationApi.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,18 @@ public void setApiClient(ApiClient apiClient) {
5454
this.apiClient = apiClient;
5555
}
5656

57-
/* Build call for getAPIGroup */
58-
private com.squareup.okhttp.Call getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
57+
/**
58+
* Build call for getAPIGroup
59+
* @param progressListener Progress listener
60+
* @param progressRequestListener Progress request listener
61+
* @return Call to execute
62+
* @throws ApiException If fail to serialize the request body object
63+
*/
64+
public com.squareup.okhttp.Call getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5965
Object localVarPostBody = null;
6066

6167
// create path and map variables
62-
String localVarPath = "/apis/authorization.k8s.io/".replaceAll("\\{format\\}","json");
68+
String localVarPath = "/apis/authorization.k8s.io/";
6369

6470
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6571

kubernetes/src/main/java/io/kubernetes/client/apis/AuthorizationV1Api.java

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,22 @@ public void setApiClient(ApiClient apiClient) {
5757
this.apiClient = apiClient;
5858
}
5959

60-
/* Build call for createNamespacedLocalSubjectAccessReview */
61-
private com.squareup.okhttp.Call createNamespacedLocalSubjectAccessReviewCall(String namespace, V1LocalSubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
60+
/**
61+
* Build call for createNamespacedLocalSubjectAccessReview
62+
* @param namespace object name and auth scope, such as for teams and projects (required)
63+
* @param body (required)
64+
* @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
65+
* @param progressListener Progress listener
66+
* @param progressRequestListener Progress request listener
67+
* @return Call to execute
68+
* @throws ApiException If fail to serialize the request body object
69+
*/
70+
public com.squareup.okhttp.Call createNamespacedLocalSubjectAccessReviewCall(String namespace, V1LocalSubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
6271
Object localVarPostBody = body;
6372

6473
// create path and map variables
65-
String localVarPath = "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews".replaceAll("\\{format\\}","json")
66-
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
74+
String localVarPath = "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews"
75+
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
6776

6877
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6978
if (pretty != null)
@@ -189,12 +198,20 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
189198
apiClient.executeAsync(call, localVarReturnType, callback);
190199
return call;
191200
}
192-
/* Build call for createSelfSubjectAccessReview */
193-
private com.squareup.okhttp.Call createSelfSubjectAccessReviewCall(V1SelfSubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
201+
/**
202+
* Build call for createSelfSubjectAccessReview
203+
* @param body (required)
204+
* @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
205+
* @param progressListener Progress listener
206+
* @param progressRequestListener Progress request listener
207+
* @return Call to execute
208+
* @throws ApiException If fail to serialize the request body object
209+
*/
210+
public com.squareup.okhttp.Call createSelfSubjectAccessReviewCall(V1SelfSubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
194211
Object localVarPostBody = body;
195212

196213
// create path and map variables
197-
String localVarPath = "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews".replaceAll("\\{format\\}","json");
214+
String localVarPath = "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews";
198215

199216
List<Pair> localVarQueryParams = new ArrayList<Pair>();
200217
if (pretty != null)
@@ -312,12 +329,20 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
312329
apiClient.executeAsync(call, localVarReturnType, callback);
313330
return call;
314331
}
315-
/* Build call for createSubjectAccessReview */
316-
private com.squareup.okhttp.Call createSubjectAccessReviewCall(V1SubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
332+
/**
333+
* Build call for createSubjectAccessReview
334+
* @param body (required)
335+
* @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
336+
* @param progressListener Progress listener
337+
* @param progressRequestListener Progress request listener
338+
* @return Call to execute
339+
* @throws ApiException If fail to serialize the request body object
340+
*/
341+
public com.squareup.okhttp.Call createSubjectAccessReviewCall(V1SubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
317342
Object localVarPostBody = body;
318343

319344
// create path and map variables
320-
String localVarPath = "/apis/authorization.k8s.io/v1/subjectaccessreviews".replaceAll("\\{format\\}","json");
345+
String localVarPath = "/apis/authorization.k8s.io/v1/subjectaccessreviews";
321346

322347
List<Pair> localVarQueryParams = new ArrayList<Pair>();
323348
if (pretty != null)
@@ -435,12 +460,18 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
435460
apiClient.executeAsync(call, localVarReturnType, callback);
436461
return call;
437462
}
438-
/* Build call for getAPIResources */
439-
private com.squareup.okhttp.Call getAPIResourcesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
463+
/**
464+
* Build call for getAPIResources
465+
* @param progressListener Progress listener
466+
* @param progressRequestListener Progress request listener
467+
* @return Call to execute
468+
* @throws ApiException If fail to serialize the request body object
469+
*/
470+
public com.squareup.okhttp.Call getAPIResourcesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
440471
Object localVarPostBody = null;
441472

442473
// create path and map variables
443-
String localVarPath = "/apis/authorization.k8s.io/v1/".replaceAll("\\{format\\}","json");
474+
String localVarPath = "/apis/authorization.k8s.io/v1/";
444475

445476
List<Pair> localVarQueryParams = new ArrayList<Pair>();
446477

0 commit comments

Comments
 (0)