/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.cloudera.api.swagger;

import com.cloudera.api.swagger.client.ApiCallback;
import com.cloudera.api.swagger.client.ApiClient;
import com.cloudera.api.swagger.client.ApiException;
import com.cloudera.api.swagger.client.ApiResponse;
import com.cloudera.api.swagger.client.Configuration;
import com.cloudera.api.swagger.client.Pair;
import com.cloudera.api.swagger.client.ProgressRequestBody;
import com.cloudera.api.swagger.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.cloudera.api.swagger.model.ApiCluster;
import com.cloudera.api.swagger.model.ApiCommand;
import com.cloudera.api.swagger.model.ApiControlPlane;
import com.cloudera.api.swagger.model.ApiControlPlaneList;
import com.cloudera.api.swagger.model.ApiCopyImagesInFeaturesArgs;
import com.cloudera.api.swagger.model.ApiEntityTag;
import com.cloudera.api.swagger.model.ApiGenerateCleanupDockerArgs;
import com.cloudera.api.swagger.model.ApiGenerateCopyDockerArgs;
import com.cloudera.api.swagger.model.ApiGenerateExternalVaultSetupArgs;
import com.cloudera.api.swagger.model.ApiInstallControlPlaneArgs;
import com.cloudera.api.swagger.model.ApiInstallEmbeddedControlPlaneArgs;
import com.cloudera.api.swagger.model.ApiRemoteRepoUrl;
import com.cloudera.api.swagger.model.ApiUninstallControlPlaneArgs;
import com.cloudera.api.swagger.model.ApiUpdateControlPlaneValuesYamlArgs;
import com.cloudera.api.swagger.model.ApiUpgradeControlPlaneArgs;
import com.cloudera.api.swagger.model.ApiUpgradeEmbeddedControlPlaneArgs;
import java.io.File;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ControlPlanesResourceApi {
    private ApiClient apiClient;

    public ControlPlanesResourceApi() {
        this(Configuration.getDefaultApiClient());
    }

    public ControlPlanesResourceApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
     * Build call for addTags
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body List of tags to add to the control plane (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call addTagsCall(String controlPlaneUuid, List<ApiEntityTag> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/tags"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call addTagsValidateBeforeCall(String controlPlaneUuid, List<ApiEntityTag> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling addTags(Async)");
        }

        okhttp3.Call call = addTagsCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Attach tags to the control plane.
     * Attach tags to the control plane.
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body List of tags to add to the control plane (optional)
     * @return List&lt;ApiEntityTag&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public List<ApiEntityTag> addTags(String controlPlaneUuid, List<ApiEntityTag> body) throws ApiException {
        ApiResponse<List<ApiEntityTag>> resp = addTagsWithHttpInfo(controlPlaneUuid, body);
        return resp.getData();
    }

    /**
     * Attach tags to the control plane.
     * Attach tags to the control plane.
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body List of tags to add to the control plane (optional)
     * @return ApiResponse&lt;List&lt;ApiEntityTag&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<List<ApiEntityTag>> addTagsWithHttpInfo(String controlPlaneUuid, List<ApiEntityTag> body) throws ApiException {
        okhttp3.Call call = addTagsValidateBeforeCall(controlPlaneUuid, body, null, null);
        Type localVarReturnType = new TypeToken<List<ApiEntityTag>>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Attach tags to the control plane. (asynchronously)
     * Attach tags to the control plane.
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body List of tags to add to the control plane (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
     */
    public okhttp3.Call addTagsAsync(String controlPlaneUuid, List<ApiEntityTag> body, final ApiCallback<List<ApiEntityTag>> 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);
                }
            };
        }

        okhttp3.Call call = addTagsValidateBeforeCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<List<ApiEntityTag>>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for copyImagesInFeatures
     * @param controlPlaneUuid  (required)
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call copyImagesInFeaturesCall(String controlPlaneUuid, ApiCopyImagesInFeaturesArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/commands/copyImagesInFeatures"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call copyImagesInFeaturesValidateBeforeCall(String controlPlaneUuid, ApiCopyImagesInFeaturesArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling copyImagesInFeatures(Async)");
        }

        okhttp3.Call call = copyImagesInFeaturesCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches the command to copy images for one or more features (a comma separated list).
     * Launches the command to copy images for one or more features (a comma separated list).
     * @param controlPlaneUuid  (required)
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand copyImagesInFeatures(String controlPlaneUuid, ApiCopyImagesInFeaturesArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = copyImagesInFeaturesWithHttpInfo(controlPlaneUuid, body);
        return resp.getData();
    }

    /**
     * Launches the command to copy images for one or more features (a comma separated list).
     * Launches the command to copy images for one or more features (a comma separated list).
     * @param controlPlaneUuid  (required)
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> copyImagesInFeaturesWithHttpInfo(String controlPlaneUuid, ApiCopyImagesInFeaturesArgs body) throws ApiException {
        okhttp3.Call call = copyImagesInFeaturesValidateBeforeCall(controlPlaneUuid, body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches the command to copy images for one or more features (a comma separated list). (asynchronously)
     * Launches the command to copy images for one or more features (a comma separated list).
     * @param controlPlaneUuid  (required)
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call copyImagesInFeaturesAsync(String controlPlaneUuid, ApiCopyImagesInFeaturesArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = copyImagesInFeaturesValidateBeforeCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for deleteTags
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body A list of tags to remove from the control plane (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call deleteTagsCall(String controlPlaneUuid, List<ApiEntityTag> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/tags"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call deleteTagsValidateBeforeCall(String controlPlaneUuid, List<ApiEntityTag> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling deleteTags(Async)");
        }

        okhttp3.Call call = deleteTagsCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Remove the tags associated with the control plane.
     * Remove the tags associated with the control plane
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body A list of tags to remove from the control plane (optional)
     * @return List&lt;ApiEntityTag&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public List<ApiEntityTag> deleteTags(String controlPlaneUuid, List<ApiEntityTag> body) throws ApiException {
        ApiResponse<List<ApiEntityTag>> resp = deleteTagsWithHttpInfo(controlPlaneUuid, body);
        return resp.getData();
    }

    /**
     * Remove the tags associated with the control plane.
     * Remove the tags associated with the control plane
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body A list of tags to remove from the control plane (optional)
     * @return ApiResponse&lt;List&lt;ApiEntityTag&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<List<ApiEntityTag>> deleteTagsWithHttpInfo(String controlPlaneUuid, List<ApiEntityTag> body) throws ApiException {
        okhttp3.Call call = deleteTagsValidateBeforeCall(controlPlaneUuid, body, null, null);
        Type localVarReturnType = new TypeToken<List<ApiEntityTag>>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Remove the tags associated with the control plane. (asynchronously)
     * Remove the tags associated with the control plane
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param body A list of tags to remove from the control plane (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
     */
    public okhttp3.Call deleteTagsAsync(String controlPlaneUuid, List<ApiEntityTag> body, final ApiCallback<List<ApiEntityTag>> 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);
                }
            };
        }

        okhttp3.Call call = deleteTagsValidateBeforeCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<List<ApiEntityTag>>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for generateCleanupDocker
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call generateCleanupDockerCall(ApiGenerateCleanupDockerArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/commands/generateCleanupDocker";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call generateCleanupDockerValidateBeforeCall(ApiGenerateCleanupDockerArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = generateCleanupDockerCall(body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches the Generate Docker Cleanup Script Command.
     * Launches the Generate Docker Cleanup Script Command
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand generateCleanupDocker(ApiGenerateCleanupDockerArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = generateCleanupDockerWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * Launches the Generate Docker Cleanup Script Command.
     * Launches the Generate Docker Cleanup Script Command
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> generateCleanupDockerWithHttpInfo(ApiGenerateCleanupDockerArgs body) throws ApiException {
        okhttp3.Call call = generateCleanupDockerValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches the Generate Docker Cleanup Script Command. (asynchronously)
     * Launches the Generate Docker Cleanup Script Command
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call generateCleanupDockerAsync(ApiGenerateCleanupDockerArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = generateCleanupDockerValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for generateCopyDocker
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call generateCopyDockerCall(ApiGenerateCopyDockerArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/commands/generateCopyDocker";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call generateCopyDockerValidateBeforeCall(ApiGenerateCopyDockerArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = generateCopyDockerCall(body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches the Generate Copy Docker Script Command.
     * Launches the Generate Copy Docker Script Command
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand generateCopyDocker(ApiGenerateCopyDockerArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = generateCopyDockerWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * Launches the Generate Copy Docker Script Command.
     * Launches the Generate Copy Docker Script Command
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> generateCopyDockerWithHttpInfo(ApiGenerateCopyDockerArgs body) throws ApiException {
        okhttp3.Call call = generateCopyDockerValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches the Generate Copy Docker Script Command. (asynchronously)
     * Launches the Generate Copy Docker Script Command
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call generateCopyDockerAsync(ApiGenerateCopyDockerArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = generateCopyDockerValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for generateExternalVaultSetup
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call generateExternalVaultSetupCall(ApiGenerateExternalVaultSetupArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/commands/generateExternalVaultSetup";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call generateExternalVaultSetupValidateBeforeCall(ApiGenerateExternalVaultSetupArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = generateExternalVaultSetupCall(body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches the Generate Vault Setup Command command.
     * Launches the Generate Vault Setup Command command
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand generateExternalVaultSetup(ApiGenerateExternalVaultSetupArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = generateExternalVaultSetupWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * Launches the Generate Vault Setup Command command.
     * Launches the Generate Vault Setup Command command
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> generateExternalVaultSetupWithHttpInfo(ApiGenerateExternalVaultSetupArgs body) throws ApiException {
        okhttp3.Call call = generateExternalVaultSetupValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches the Generate Vault Setup Command command. (asynchronously)
     * Launches the Generate Vault Setup Command command
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call generateExternalVaultSetupAsync(ApiGenerateExternalVaultSetupArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = generateExternalVaultSetupValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getControlPlanes
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call getControlPlanesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/controlPlanes";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getControlPlanesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = getControlPlanesCall(progressListener, progressRequestListener);
        return call;

    }

    /**
     * Current Control Planes.
     * Current Control Planes
     * @return ApiControlPlaneList
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiControlPlaneList getControlPlanes() throws ApiException {
        ApiResponse<ApiControlPlaneList> resp = getControlPlanesWithHttpInfo();
        return resp.getData();
    }

    /**
     * Current Control Planes.
     * Current Control Planes
     * @return ApiResponse&lt;ApiControlPlaneList&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiControlPlaneList> getControlPlanesWithHttpInfo() throws ApiException {
        okhttp3.Call call = getControlPlanesValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<ApiControlPlaneList>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Current Control Planes. (asynchronously)
     * Current Control Planes
     * @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 okhttp3.Call getControlPlanesAsync(final ApiCallback<ApiControlPlaneList> 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);
                }
            };
        }

        okhttp3.Call call = getControlPlanesValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiControlPlaneList>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getExperienceCluster
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call getExperienceClusterCall(String controlPlaneUuid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/getTaggedCluster"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getExperienceClusterValidateBeforeCall(String controlPlaneUuid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling getExperienceCluster(Async)");
        }

        okhttp3.Call call = getExperienceClusterCall(controlPlaneUuid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * The cluster with tags matching this control plane&#x27;s UUID, if any.
     * The cluster with tags matching this control plane&#x27;s UUID, if any
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @return ApiCluster
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCluster getExperienceCluster(String controlPlaneUuid) throws ApiException {
        ApiResponse<ApiCluster> resp = getExperienceClusterWithHttpInfo(controlPlaneUuid);
        return resp.getData();
    }

    /**
     * The cluster with tags matching this control plane&#x27;s UUID, if any.
     * The cluster with tags matching this control plane&#x27;s UUID, if any
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @return ApiResponse&lt;ApiCluster&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCluster> getExperienceClusterWithHttpInfo(String controlPlaneUuid) throws ApiException {
        okhttp3.Call call = getExperienceClusterValidateBeforeCall(controlPlaneUuid, null, null);
        Type localVarReturnType = new TypeToken<ApiCluster>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * The cluster with tags matching this control plane&#x27;s UUID, if any. (asynchronously)
     * The cluster with tags matching this control plane&#x27;s UUID, if any
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @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 okhttp3.Call getExperienceClusterAsync(String controlPlaneUuid, final ApiCallback<ApiCluster> 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);
                }
            };
        }

        okhttp3.Call call = getExperienceClusterValidateBeforeCall(controlPlaneUuid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCluster>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getLogContent
     * @param commandId the command id (required)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call getLogContentCall(java.math.BigDecimal commandId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/controlPlanes/fetchResources/{commandId}/logContent"
            .replaceAll("\\{" + "commandId" + "\\}", apiClient.escapeString(commandId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "text/plain"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getLogContentValidateBeforeCall(java.math.BigDecimal commandId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'commandId' is set
        if (commandId == null) {
            throw new ApiException("Missing the required parameter 'commandId' when calling getLogContent(Async)");
        }

        okhttp3.Call call = getLogContentCall(commandId, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Fetches the log content for the specific command.
     * Fetches the log content for the specific command.
     * @param commandId the command id (required)
     * @return File
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public File getLogContent(java.math.BigDecimal commandId) throws ApiException {
        ApiResponse<File> resp = getLogContentWithHttpInfo(commandId);
        return resp.getData();
    }

    /**
     * Fetches the log content for the specific command.
     * Fetches the log content for the specific command.
     * @param commandId the command id (required)
     * @return ApiResponse&lt;File&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<File> getLogContentWithHttpInfo(java.math.BigDecimal commandId) throws ApiException {
        okhttp3.Call call = getLogContentValidateBeforeCall(commandId, null, null);
        Type localVarReturnType = new TypeToken<File>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Fetches the log content for the specific command. (asynchronously)
     * Fetches the log content for the specific command.
     * @param commandId the command id (required)
     * @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 okhttp3.Call getLogContentAsync(java.math.BigDecimal commandId, final ApiCallback<File> 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);
                }
            };
        }

        okhttp3.Call call = getLogContentValidateBeforeCall(commandId, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<File>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getManifestJson
     * @param body the remote repo url. (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call getManifestJsonCall(ApiRemoteRepoUrl body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/fetchResources/manifest.json";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getManifestJsonValidateBeforeCall(ApiRemoteRepoUrl body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = getManifestJsonCall(body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Fetches the manifest.
     * Fetches the manifest.json under the specified remote repo.
     * @param body the remote repo url. (optional)
     * @return File
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public File getManifestJson(ApiRemoteRepoUrl body) throws ApiException {
        ApiResponse<File> resp = getManifestJsonWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * Fetches the manifest.
     * Fetches the manifest.json under the specified remote repo.
     * @param body the remote repo url. (optional)
     * @return ApiResponse&lt;File&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<File> getManifestJsonWithHttpInfo(ApiRemoteRepoUrl body) throws ApiException {
        okhttp3.Call call = getManifestJsonValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken<File>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Fetches the manifest. (asynchronously)
     * Fetches the manifest.json under the specified remote repo.
     * @param body the remote repo url. (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
     */
    public okhttp3.Call getManifestJsonAsync(ApiRemoteRepoUrl body, final ApiCallback<File> 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);
                }
            };
        }

        okhttp3.Call call = getManifestJsonValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<File>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for installControlPlane
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call installControlPlaneCall(ApiInstallControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/commands/installControlPlane";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call installControlPlaneValidateBeforeCall(ApiInstallControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = installControlPlaneCall(body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches the install control plane command.
     * Launches the install control plane command.
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand installControlPlane(ApiInstallControlPlaneArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = installControlPlaneWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * Launches the install control plane command.
     * Launches the install control plane command.
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> installControlPlaneWithHttpInfo(ApiInstallControlPlaneArgs body) throws ApiException {
        okhttp3.Call call = installControlPlaneValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches the install control plane command. (asynchronously)
     * Launches the install control plane command.
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call installControlPlaneAsync(ApiInstallControlPlaneArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = installControlPlaneValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for installEmbeddedControlPlane
     * @param body The arguments for Ek8s control plane installation (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call installEmbeddedControlPlaneCall(ApiInstallEmbeddedControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/commands/installEmbeddedControlPlane";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call installEmbeddedControlPlaneValidateBeforeCall(ApiInstallEmbeddedControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = installEmbeddedControlPlaneCall(body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Brings up a control plane on embedded kubernetes.
     * Brings up a control plane on embedded kubernetes. At its core, this command launches the FirstRun command on the Containerized Cluster.
     * @param body The arguments for Ek8s control plane installation (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand installEmbeddedControlPlane(ApiInstallEmbeddedControlPlaneArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = installEmbeddedControlPlaneWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * Brings up a control plane on embedded kubernetes.
     * Brings up a control plane on embedded kubernetes. At its core, this command launches the FirstRun command on the Containerized Cluster.
     * @param body The arguments for Ek8s control plane installation (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> installEmbeddedControlPlaneWithHttpInfo(ApiInstallEmbeddedControlPlaneArgs body) throws ApiException {
        okhttp3.Call call = installEmbeddedControlPlaneValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Brings up a control plane on embedded kubernetes. (asynchronously)
     * Brings up a control plane on embedded kubernetes. At its core, this command launches the FirstRun command on the Containerized Cluster.
     * @param body The arguments for Ek8s control plane installation (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
     */
    public okhttp3.Call installEmbeddedControlPlaneAsync(ApiInstallEmbeddedControlPlaneArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = installEmbeddedControlPlaneValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for readControlPlaneByUuid
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call readControlPlaneByUuidCall(String controlPlaneUuid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call readControlPlaneByUuidValidateBeforeCall(String controlPlaneUuid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling readControlPlaneByUuid(Async)");
        }

        okhttp3.Call call = readControlPlaneByUuidCall(controlPlaneUuid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * The control plane with the given id.
     * The control plane with the given id
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @return ApiControlPlane
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiControlPlane readControlPlaneByUuid(String controlPlaneUuid) throws ApiException {
        ApiResponse<ApiControlPlane> resp = readControlPlaneByUuidWithHttpInfo(controlPlaneUuid);
        return resp.getData();
    }

    /**
     * The control plane with the given id.
     * The control plane with the given id
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @return ApiResponse&lt;ApiControlPlane&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiControlPlane> readControlPlaneByUuidWithHttpInfo(String controlPlaneUuid) throws ApiException {
        okhttp3.Call call = readControlPlaneByUuidValidateBeforeCall(controlPlaneUuid, null, null);
        Type localVarReturnType = new TypeToken<ApiControlPlane>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * The control plane with the given id. (asynchronously)
     * The control plane with the given id
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @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 okhttp3.Call readControlPlaneByUuidAsync(String controlPlaneUuid, final ApiCallback<ApiControlPlane> 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);
                }
            };
        }

        okhttp3.Call call = readControlPlaneByUuidValidateBeforeCall(controlPlaneUuid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiControlPlane>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for readTags
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param limit Number of tags (optional, default to 10)
     * @param offset Index of the first tag to retrieve (optional, default to 0)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call readTagsCall(String controlPlaneUuid, java.math.BigDecimal limit, java.math.BigDecimal offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/tags"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        if (limit != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
        if (offset != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call readTagsValidateBeforeCall(String controlPlaneUuid, java.math.BigDecimal limit, java.math.BigDecimal offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling readTags(Async)");
        }

        okhttp3.Call call = readTagsCall(controlPlaneUuid, limit, offset, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Returns the tags associated with this control plane.
     * Returns the tags associated with this control plane.
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param limit Number of tags (optional, default to 10)
     * @param offset Index of the first tag to retrieve (optional, default to 0)
     * @return List&lt;ApiEntityTag&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public List<ApiEntityTag> readTags(String controlPlaneUuid, java.math.BigDecimal limit, java.math.BigDecimal offset) throws ApiException {
        ApiResponse<List<ApiEntityTag>> resp = readTagsWithHttpInfo(controlPlaneUuid, limit, offset);
        return resp.getData();
    }

    /**
     * Returns the tags associated with this control plane.
     * Returns the tags associated with this control plane.
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param limit Number of tags (optional, default to 10)
     * @param offset Index of the first tag to retrieve (optional, default to 0)
     * @return ApiResponse&lt;List&lt;ApiEntityTag&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<List<ApiEntityTag>> readTagsWithHttpInfo(String controlPlaneUuid, java.math.BigDecimal limit, java.math.BigDecimal offset) throws ApiException {
        okhttp3.Call call = readTagsValidateBeforeCall(controlPlaneUuid, limit, offset, null, null);
        Type localVarReturnType = new TypeToken<List<ApiEntityTag>>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Returns the tags associated with this control plane. (asynchronously)
     * Returns the tags associated with this control plane.
     * @param controlPlaneUuid The uuid of the control plane. (required)
     * @param limit Number of tags (optional, default to 10)
     * @param offset Index of the first tag to retrieve (optional, default to 0)
     * @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 okhttp3.Call readTagsAsync(String controlPlaneUuid, java.math.BigDecimal limit, java.math.BigDecimal offset, final ApiCallback<List<ApiEntityTag>> 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);
                }
            };
        }

        okhttp3.Call call = readTagsValidateBeforeCall(controlPlaneUuid, limit, offset, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<List<ApiEntityTag>>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for uninstallControlPlane
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call uninstallControlPlaneCall(String controlPlaneUuid, ApiUninstallControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/commands/uninstallControlPlane"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call uninstallControlPlaneValidateBeforeCall(String controlPlaneUuid, ApiUninstallControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling uninstallControlPlane(Async)");
        }

        okhttp3.Call call = uninstallControlPlaneCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches Uninstall Command on the control plane with the given uuid.
     * Launches Uninstall Command on the control plane with the given uuid
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand uninstallControlPlane(String controlPlaneUuid, ApiUninstallControlPlaneArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = uninstallControlPlaneWithHttpInfo(controlPlaneUuid, body);
        return resp.getData();
    }

    /**
     * Launches Uninstall Command on the control plane with the given uuid.
     * Launches Uninstall Command on the control plane with the given uuid
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> uninstallControlPlaneWithHttpInfo(String controlPlaneUuid, ApiUninstallControlPlaneArgs body) throws ApiException {
        okhttp3.Call call = uninstallControlPlaneValidateBeforeCall(controlPlaneUuid, body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches Uninstall Command on the control plane with the given uuid. (asynchronously)
     * Launches Uninstall Command on the control plane with the given uuid
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call uninstallControlPlaneAsync(String controlPlaneUuid, ApiUninstallControlPlaneArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = uninstallControlPlaneValidateBeforeCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for updateValuesYaml
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call updateValuesYamlCall(String controlPlaneUuid, ApiUpdateControlPlaneValuesYamlArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/commands/updateControlPlaneValuesYaml"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateValuesYamlValidateBeforeCall(String controlPlaneUuid, ApiUpdateControlPlaneValuesYamlArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling updateValuesYaml(Async)");
        }

        okhttp3.Call call = updateValuesYamlCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches update the values.
     * Launches update the values.yaml from the control plane with the given uuid This updates the content of values.yaml.merged in the CM database.
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand updateValuesYaml(String controlPlaneUuid, ApiUpdateControlPlaneValuesYamlArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = updateValuesYamlWithHttpInfo(controlPlaneUuid, body);
        return resp.getData();
    }

    /**
     * Launches update the values.
     * Launches update the values.yaml from the control plane with the given uuid This updates the content of values.yaml.merged in the CM database.
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> updateValuesYamlWithHttpInfo(String controlPlaneUuid, ApiUpdateControlPlaneValuesYamlArgs body) throws ApiException {
        okhttp3.Call call = updateValuesYamlValidateBeforeCall(controlPlaneUuid, body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches update the values. (asynchronously)
     * Launches update the values.yaml from the control plane with the given uuid This updates the content of values.yaml.merged in the CM database.
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call updateValuesYamlAsync(String controlPlaneUuid, ApiUpdateControlPlaneValuesYamlArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = updateValuesYamlValidateBeforeCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for upgradeControlPlane
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call upgradeControlPlaneCall(String controlPlaneUuid, ApiUpgradeControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/{controlPlaneUuid}/commands/upgradeControlPlane"
            .replaceAll("\\{" + "controlPlaneUuid" + "\\}", apiClient.escapeString(controlPlaneUuid.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call upgradeControlPlaneValidateBeforeCall(String controlPlaneUuid, ApiUpgradeControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'controlPlaneUuid' is set
        if (controlPlaneUuid == null) {
            throw new ApiException("Missing the required parameter 'controlPlaneUuid' when calling upgradeControlPlane(Async)");
        }

        okhttp3.Call call = upgradeControlPlaneCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Launches the Upgrade Command on the control plane with the given uuid.
     * Launches the Upgrade Command on the control plane with the given uuid
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand upgradeControlPlane(String controlPlaneUuid, ApiUpgradeControlPlaneArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = upgradeControlPlaneWithHttpInfo(controlPlaneUuid, body);
        return resp.getData();
    }

    /**
     * Launches the Upgrade Command on the control plane with the given uuid.
     * Launches the Upgrade Command on the control plane with the given uuid
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> upgradeControlPlaneWithHttpInfo(String controlPlaneUuid, ApiUpgradeControlPlaneArgs body) throws ApiException {
        okhttp3.Call call = upgradeControlPlaneValidateBeforeCall(controlPlaneUuid, body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Launches the Upgrade Command on the control plane with the given uuid. (asynchronously)
     * Launches the Upgrade Command on the control plane with the given uuid
     * @param controlPlaneUuid The universally unique id of the control plane (required)
     * @param body Arguments for the Command (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
     */
    public okhttp3.Call upgradeControlPlaneAsync(String controlPlaneUuid, ApiUpgradeControlPlaneArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = upgradeControlPlaneValidateBeforeCall(controlPlaneUuid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for upgradeEmbeddedControlPlane
     * @param body The arguments for Ek8s control plane upgrade (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public okhttp3.Call upgradeEmbeddedControlPlaneCall(ApiUpgradeEmbeddedControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/controlPlanes/commands/upgradeEmbeddedControlPlane";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
                @Override
                public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
                    okhttp3.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "basic" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call upgradeEmbeddedControlPlaneValidateBeforeCall(ApiUpgradeEmbeddedControlPlaneArgs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = upgradeEmbeddedControlPlaneCall(body, progressListener, progressRequestListener);
        return call;

    }

    /**
     * Upgrade a Containerized Cluster, including upgrading the control plane running on embedded kubernetes.
     * Upgrade a Containerized Cluster, including upgrading the control plane running on embedded kubernetes.
     * @param body The arguments for Ek8s control plane upgrade (optional)
     * @return ApiCommand
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiCommand upgradeEmbeddedControlPlane(ApiUpgradeEmbeddedControlPlaneArgs body) throws ApiException {
        ApiResponse<ApiCommand> resp = upgradeEmbeddedControlPlaneWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * Upgrade a Containerized Cluster, including upgrading the control plane running on embedded kubernetes.
     * Upgrade a Containerized Cluster, including upgrading the control plane running on embedded kubernetes.
     * @param body The arguments for Ek8s control plane upgrade (optional)
     * @return ApiResponse&lt;ApiCommand&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ApiCommand> upgradeEmbeddedControlPlaneWithHttpInfo(ApiUpgradeEmbeddedControlPlaneArgs body) throws ApiException {
        okhttp3.Call call = upgradeEmbeddedControlPlaneValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Upgrade a Containerized Cluster, including upgrading the control plane running on embedded kubernetes. (asynchronously)
     * Upgrade a Containerized Cluster, including upgrading the control plane running on embedded kubernetes.
     * @param body The arguments for Ek8s control plane upgrade (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
     */
    public okhttp3.Call upgradeEmbeddedControlPlaneAsync(ApiUpgradeEmbeddedControlPlaneArgs body, final ApiCallback<ApiCommand> 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);
                }
            };
        }

        okhttp3.Call call = upgradeEmbeddedControlPlaneValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ApiCommand>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
}
