use of io.kubernetes.client.models.V1APIResourceList in project java by kubernetes-client.
the class ApiextensionsV1beta1Api method getAPIResourcesAsync.
/**
* (asynchronously)
* get available resources
* @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
*/
public com.squareup.okhttp.Call getAPIResourcesAsync(final ApiCallback<V1APIResourceList> 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);
Type localVarReturnType = new TypeToken<V1APIResourceList>() {
}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
use of io.kubernetes.client.models.V1APIResourceList in project java by kubernetes-client.
the class AdmissionregistrationV1alpha1Api method getAPIResourcesWithHttpInfo.
/**
* get available resources
* @return ApiResponse<V1APIResourceList>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<V1APIResourceList> getAPIResourcesWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = getAPIResourcesValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken<V1APIResourceList>() {
}.getType();
return apiClient.execute(call, localVarReturnType);
}
use of io.kubernetes.client.models.V1APIResourceList in project java by kubernetes-client.
the class ApiregistrationV1beta1Api method getAPIResourcesAsync.
/**
* (asynchronously)
* get available resources
* @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
*/
public com.squareup.okhttp.Call getAPIResourcesAsync(final ApiCallback<V1APIResourceList> 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);
Type localVarReturnType = new TypeToken<V1APIResourceList>() {
}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
use of io.kubernetes.client.models.V1APIResourceList in project java by kubernetes-client.
the class AuthorizationV1beta1Api method getAPIResourcesAsync.
/**
* (asynchronously)
* get available resources
* @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
*/
public com.squareup.okhttp.Call getAPIResourcesAsync(final ApiCallback<V1APIResourceList> 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);
Type localVarReturnType = new TypeToken<V1APIResourceList>() {
}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
use of io.kubernetes.client.models.V1APIResourceList in project java by kubernetes-client.
the class AuthorizationV1Api method getAPIResourcesAsync.
/**
* (asynchronously)
* get available resources
* @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
*/
public com.squareup.okhttp.Call getAPIResourcesAsync(final ApiCallback<V1APIResourceList> 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);
Type localVarReturnType = new TypeToken<V1APIResourceList>() {
}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
Aggregations