Search in sources :

Example 1 with V1APIResourceList

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;
}
Also used : ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) Type(java.lang.reflect.Type) V1APIResourceList(io.kubernetes.client.models.V1APIResourceList) ProgressRequestBody(io.kubernetes.client.ProgressRequestBody)

Example 2 with V1APIResourceList

use of io.kubernetes.client.models.V1APIResourceList in project java by kubernetes-client.

the class AdmissionregistrationV1alpha1Api method getAPIResourcesWithHttpInfo.

/**
 * get available resources
 * @return ApiResponse&lt;V1APIResourceList&gt;
 * @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);
}
Also used : Type(java.lang.reflect.Type) V1APIResourceList(io.kubernetes.client.models.V1APIResourceList)

Example 3 with V1APIResourceList

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;
}
Also used : ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) Type(java.lang.reflect.Type) V1APIResourceList(io.kubernetes.client.models.V1APIResourceList) ProgressRequestBody(io.kubernetes.client.ProgressRequestBody)

Example 4 with V1APIResourceList

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;
}
Also used : ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) Type(java.lang.reflect.Type) V1APIResourceList(io.kubernetes.client.models.V1APIResourceList) ProgressRequestBody(io.kubernetes.client.ProgressRequestBody)

Example 5 with V1APIResourceList

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;
}
Also used : ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) Type(java.lang.reflect.Type) V1APIResourceList(io.kubernetes.client.models.V1APIResourceList) ProgressRequestBody(io.kubernetes.client.ProgressRequestBody)

Aggregations

V1APIResourceList (io.kubernetes.client.models.V1APIResourceList)53 Type (java.lang.reflect.Type)52 ProgressRequestBody (io.kubernetes.client.ProgressRequestBody)26 ProgressResponseBody (io.kubernetes.client.ProgressResponseBody)26 ApiClient (io.kubernetes.client.ApiClient)1 CoreV1Api (io.kubernetes.client.apis.CoreV1Api)1 Authenticator (oracle.kubernetes.operator.authentication.Authenticator)1 Test (org.junit.Test)1