|
1 | 1 | /*
|
2 |
| - * Kubernetes |
3 |
| - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
4 |
| - * |
5 |
| - * The version of the OpenAPI document: release-1.22 |
6 |
| - * |
7 |
| - * |
8 |
| - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
9 |
| - * https://openapi-generator.tech |
10 |
| - * Do not edit the class manually. |
11 |
| - */ |
12 |
| - |
13 |
| - |
| 2 | +Copyright 2021 The Kubernetes Authors. |
| 3 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +you may not use this file except in compliance with the License. |
| 5 | +You may obtain a copy of the License at |
| 6 | +http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +Unless required by applicable law or agreed to in writing, software |
| 8 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 | +See the License for the specific language governing permissions and |
| 11 | +limitations under the License. |
| 12 | +*/ |
14 | 13 | package io.kubernetes.client.openapi;
|
15 | 14 |
|
16 |
| -import java.io.IOException; |
17 |
| - |
18 |
| -import java.util.Map; |
19 | 15 | import java.util.List;
|
| 16 | +import java.util.Map; |
20 | 17 |
|
21 | 18 | /**
|
22 | 19 | * Callback for asynchronous API call.
|
23 | 20 | *
|
24 | 21 | * @param <T> The return type
|
25 | 22 | */
|
26 | 23 | public interface ApiCallback<T> {
|
27 |
| - /** |
28 |
| - * This is called when the API call fails. |
29 |
| - * |
30 |
| - * @param e The exception causing the failure |
31 |
| - * @param statusCode Status code of the response if available, otherwise it would be 0 |
32 |
| - * @param responseHeaders Headers of the response if available, otherwise it would be null |
33 |
| - */ |
34 |
| - void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders); |
35 |
| - |
36 |
| - /** |
37 |
| - * This is called when the API call succeeded. |
38 |
| - * |
39 |
| - * @param result The result deserialized from response |
40 |
| - * @param statusCode Status code of the response |
41 |
| - * @param responseHeaders Headers of the response |
42 |
| - */ |
43 |
| - void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders); |
44 |
| - |
45 |
| - /** |
46 |
| - * This is called when the API upload processing. |
47 |
| - * |
48 |
| - * @param bytesWritten bytes Written |
49 |
| - * @param contentLength content length of request body |
50 |
| - * @param done write end |
51 |
| - */ |
52 |
| - void onUploadProgress(long bytesWritten, long contentLength, boolean done); |
53 |
| - |
54 |
| - /** |
55 |
| - * This is called when the API downlond processing. |
56 |
| - * |
57 |
| - * @param bytesRead bytes Read |
58 |
| - * @param contentLength content lenngth of the response |
59 |
| - * @param done Read end |
60 |
| - */ |
61 |
| - void onDownloadProgress(long bytesRead, long contentLength, boolean done); |
| 24 | + /** |
| 25 | + * This is called when the API call fails. |
| 26 | + * |
| 27 | + * @param e The exception causing the failure |
| 28 | + * @param statusCode Status code of the response if available, otherwise it would be 0 |
| 29 | + * @param responseHeaders Headers of the response if available, otherwise it would be null |
| 30 | + */ |
| 31 | + void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders); |
| 32 | + |
| 33 | + /** |
| 34 | + * This is called when the API call succeeded. |
| 35 | + * |
| 36 | + * @param result The result deserialized from response |
| 37 | + * @param statusCode Status code of the response |
| 38 | + * @param responseHeaders Headers of the response |
| 39 | + */ |
| 40 | + void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders); |
| 41 | + |
| 42 | + /** |
| 43 | + * This is called when the API upload processing. |
| 44 | + * |
| 45 | + * @param bytesWritten bytes Written |
| 46 | + * @param contentLength content length of request body |
| 47 | + * @param done write end |
| 48 | + */ |
| 49 | + void onUploadProgress(long bytesWritten, long contentLength, boolean done); |
| 50 | + |
| 51 | + /** |
| 52 | + * This is called when the API downlond processing. |
| 53 | + * |
| 54 | + * @param bytesRead bytes Read |
| 55 | + * @param contentLength content lenngth of the response |
| 56 | + * @param done Read end |
| 57 | + */ |
| 58 | + void onDownloadProgress(long bytesRead, long contentLength, boolean done); |
62 | 59 | }
|
0 commit comments