All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nextbreakpoint.flinkclient.api.DefaultApi Maven / Gradle / Ivy

The newest version!
/*
 * This file is part of FlinkClient
 * https://github.com/nextbreakpoint/flinkclient
 *
 * OpenAPI spec version: v1/1.20-SNAPSHOT
 * Contact: [email protected]
 *
 * 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.nextbreakpoint.flinkclient.api;

import com.nextbreakpoint.flinkclient.api.ApiCallback;
import com.nextbreakpoint.flinkclient.api.ApiClient;
import com.nextbreakpoint.flinkclient.api.ApiException;
import com.nextbreakpoint.flinkclient.api.ApiResponse;
import com.nextbreakpoint.flinkclient.api.Configuration;
import com.nextbreakpoint.flinkclient.api.Pair;
import com.nextbreakpoint.flinkclient.api.ProgressRequestBody;
import com.nextbreakpoint.flinkclient.api.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.nextbreakpoint.flinkclient.model.AggregatedMetricsResponseBody;
import com.nextbreakpoint.flinkclient.model.AggregationMode;
import com.nextbreakpoint.flinkclient.model.AsynchronousOperationResult;
import com.nextbreakpoint.flinkclient.model.CheckpointConfigInfo;
import com.nextbreakpoint.flinkclient.model.CheckpointStatistics;
import com.nextbreakpoint.flinkclient.model.CheckpointTriggerRequestBody;
import com.nextbreakpoint.flinkclient.model.CheckpointingStatistics;
import com.nextbreakpoint.flinkclient.model.ClusterDataSetListResponseBody;
import com.nextbreakpoint.flinkclient.model.ClusterOverviewWithVersion;
import com.nextbreakpoint.flinkclient.model.ConfigurationInfoEntry;
import com.nextbreakpoint.flinkclient.model.DashboardConfiguration;
import com.nextbreakpoint.flinkclient.model.EnvironmentInfo;
import com.nextbreakpoint.flinkclient.model.FailureLabel;
import java.io.File;
import com.nextbreakpoint.flinkclient.model.JarListInfo;
import com.nextbreakpoint.flinkclient.model.JarPlanRequestBody;
import com.nextbreakpoint.flinkclient.model.JarRunRequestBody;
import com.nextbreakpoint.flinkclient.model.JarRunResponseBody;
import com.nextbreakpoint.flinkclient.model.JarUploadResponseBody;
import com.nextbreakpoint.flinkclient.model.JobAccumulatorsInfo;
import com.nextbreakpoint.flinkclient.model.JobClientHeartbeatRequestBody;
import com.nextbreakpoint.flinkclient.model.JobConfigInfo;
import com.nextbreakpoint.flinkclient.model.JobDetailsInfo;
import com.nextbreakpoint.flinkclient.model.JobExceptionsInfoWithHistory;
import com.nextbreakpoint.flinkclient.model.JobExecutionResultResponseBody;
import com.nextbreakpoint.flinkclient.model.JobIdsWithStatusOverview;
import com.nextbreakpoint.flinkclient.model.JobPlanInfo;
import com.nextbreakpoint.flinkclient.model.JobResourceRequirementsBody;
import com.nextbreakpoint.flinkclient.model.JobStatusInfo;
import com.nextbreakpoint.flinkclient.model.JobSubmitRequestBody;
import com.nextbreakpoint.flinkclient.model.JobSubmitResponseBody;
import com.nextbreakpoint.flinkclient.model.JobVertexAccumulatorsInfo;
import com.nextbreakpoint.flinkclient.model.JobVertexBackPressureInfo;
import com.nextbreakpoint.flinkclient.model.JobVertexDetailsInfo;
import com.nextbreakpoint.flinkclient.model.JobVertexResourceRequirements;
import com.nextbreakpoint.flinkclient.model.JobVertexTaskManagersInfo;
import com.nextbreakpoint.flinkclient.model.LogListInfo;
import com.nextbreakpoint.flinkclient.model.LogUrlResponse;
import com.nextbreakpoint.flinkclient.model.MetricCollectionResponseBody;
import com.nextbreakpoint.flinkclient.model.MultipleJobsDetails;
import com.nextbreakpoint.flinkclient.model.SavepointDisposalRequest;
import com.nextbreakpoint.flinkclient.model.SavepointTriggerRequestBody;
import com.nextbreakpoint.flinkclient.model.StopWithSavepointRequestBody;
import com.nextbreakpoint.flinkclient.model.SubtaskExecutionAttemptAccumulatorsInfo;
import com.nextbreakpoint.flinkclient.model.SubtaskExecutionAttemptDetailsInfo;
import com.nextbreakpoint.flinkclient.model.SubtasksAllAccumulatorsInfo;
import com.nextbreakpoint.flinkclient.model.SubtasksTimesInfo;
import com.nextbreakpoint.flinkclient.model.TaskCheckpointStatisticsWithSubtaskDetails;
import com.nextbreakpoint.flinkclient.model.TaskManagerDetailsInfo;
import com.nextbreakpoint.flinkclient.model.TaskManagersInfo;
import com.nextbreakpoint.flinkclient.model.TerminationMode;
import com.nextbreakpoint.flinkclient.model.ThreadDumpInfo;
import com.nextbreakpoint.flinkclient.model.ThreadStates;
import com.nextbreakpoint.flinkclient.model.TriggerResponse;
import com.nextbreakpoint.flinkclient.model.VertexFlameGraph;

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

public class DefaultApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Build call for cancelJob
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param mode String value that specifies the termination mode. The only supported value is: \"cancel\". (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 cancelJobCall(String jobid, TerminationMode mode, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (mode != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("mode", mode));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            
        };
        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = cancelJobCall(jobid, mode, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Terminates a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param mode String value that specifies the termination mode. The only supported value is: \"cancel\". (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void cancelJob(String jobid, TerminationMode mode) throws ApiException {
        cancelJobWithHttpInfo(jobid, mode);
    }

    /**
     * 
     * Terminates a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param mode String value that specifies the termination mode. The only supported value is: \"cancel\". (optional)
     * @return ApiResponse<Void>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse cancelJobWithHttpInfo(String jobid, TerminationMode mode) throws ApiException {
        okhttp3.Call call = cancelJobValidateBeforeCall(jobid, mode, null, null);
        return apiClient.execute(call);
    }

    /**
     *  (asynchronously)
     * Terminates a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param mode String value that specifies the termination mode. The only supported value is: \"cancel\". (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 cancelJobAsync(String jobid, TerminationMode mode, final ApiCallback 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 = cancelJobValidateBeforeCall(jobid, mode, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }
    /**
     * Build call for deleteClusterDataSet
     * @param datasetid 32-character hexadecimal string value that identifies a cluster data set. (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 deleteClusterDataSetCall(String datasetid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Triggers the deletion of a cluster data set. This async operation would return a 'triggerid' for further query identifier.
     * @param datasetid 32-character hexadecimal string value that identifies a cluster data set. (required)
     * @return TriggerResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TriggerResponse deleteClusterDataSet(String datasetid) throws ApiException {
        ApiResponse resp = deleteClusterDataSetWithHttpInfo(datasetid);
        return resp.getData();
    }

    /**
     * 
     * Triggers the deletion of a cluster data set. This async operation would return a 'triggerid' for further query identifier.
     * @param datasetid 32-character hexadecimal string value that identifies a cluster data set. (required)
     * @return ApiResponse<TriggerResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse deleteClusterDataSetWithHttpInfo(String datasetid) throws ApiException {
        okhttp3.Call call = deleteClusterDataSetValidateBeforeCall(datasetid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Triggers the deletion of a cluster data set. This async operation would return a 'triggerid' for further query identifier.
     * @param datasetid 32-character hexadecimal string value that identifies a cluster data set. (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 deleteClusterDataSetAsync(String datasetid, final ApiCallback 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 = deleteClusterDataSetValidateBeforeCall(datasetid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for deleteJar
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (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 deleteJarCall(String jarid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            
        };
        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Deletes a jar previously uploaded via '/jars/upload'.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void deleteJar(String jarid) throws ApiException {
        deleteJarWithHttpInfo(jarid);
    }

    /**
     * 
     * Deletes a jar previously uploaded via '/jars/upload'.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @return ApiResponse<Void>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse deleteJarWithHttpInfo(String jarid) throws ApiException {
        okhttp3.Call call = deleteJarValidateBeforeCall(jarid, null, null);
        return apiClient.execute(call);
    }

    /**
     *  (asynchronously)
     * Deletes a jar previously uploaded via '/jars/upload'.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (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 deleteJarAsync(String jarid, final ApiCallback 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 = deleteJarValidateBeforeCall(jarid, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }
    /**
     * Build call for generatePlanFromJar
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (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 generatePlanFromJarCall(String jarid, JarPlanRequestBody body, String programArgs, String programArg, String entryClass, Integer parallelism, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (programArgs != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("program-args", programArgs));
        if (programArg != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("programArg", programArg));
        if (entryClass != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("entry-class", entryClass));
        if (parallelism != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("parallelism", parallelism));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call generatePlanFromJarValidateBeforeCall(String jarid, JarPlanRequestBody body, String programArgs, String programArg, String entryClass, Integer parallelism, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'jarid' is set
        if (jarid == null) {
            throw new ApiException("Missing the required parameter 'jarid' when calling generatePlanFromJar(Async)");
        }

        okhttp3.Call call = generatePlanFromJarCall(jarid, body, programArgs, programArg, entryClass, parallelism, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the dataflow plan of a job contained in a jar previously uploaded via '/jars/upload'. Program arguments can be passed both via the JSON request (recommended) or query parameters.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (optional)
     * @return JobPlanInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobPlanInfo generatePlanFromJar(String jarid, JarPlanRequestBody body, String programArgs, String programArg, String entryClass, Integer parallelism) throws ApiException {
        ApiResponse resp = generatePlanFromJarWithHttpInfo(jarid, body, programArgs, programArg, entryClass, parallelism);
        return resp.getData();
    }

    /**
     * 
     * Returns the dataflow plan of a job contained in a jar previously uploaded via '/jars/upload'. Program arguments can be passed both via the JSON request (recommended) or query parameters.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (optional)
     * @return ApiResponse<JobPlanInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse generatePlanFromJarWithHttpInfo(String jarid, JarPlanRequestBody body, String programArgs, String programArg, String entryClass, Integer parallelism) throws ApiException {
        okhttp3.Call call = generatePlanFromJarValidateBeforeCall(jarid, body, programArgs, programArg, entryClass, parallelism, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the dataflow plan of a job contained in a jar previously uploaded via '/jars/upload'. Program arguments can be passed both via the JSON request (recommended) or query parameters.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (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 generatePlanFromJarAsync(String jarid, JarPlanRequestBody body, String programArgs, String programArg, String entryClass, Integer parallelism, final ApiCallback 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 = generatePlanFromJarValidateBeforeCall(jarid, body, programArgs, programArg, entryClass, parallelism, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getAggregatedJobMetrics
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param jobs Comma-separated list of 32-character hexadecimal strings to select specific jobs. (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 getAggregatedJobMetricsCall(String get, AggregationMode agg, String jobs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/metrics";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));
        if (agg != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("agg", agg));
        if (jobs != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("jobs", jobs));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getAggregatedJobMetricsValidateBeforeCall(String get, AggregationMode agg, String jobs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = getAggregatedJobMetricsCall(get, agg, jobs, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to aggregated job metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param jobs Comma-separated list of 32-character hexadecimal strings to select specific jobs. (optional)
     * @return AggregatedMetricsResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AggregatedMetricsResponseBody getAggregatedJobMetrics(String get, AggregationMode agg, String jobs) throws ApiException {
        ApiResponse resp = getAggregatedJobMetricsWithHttpInfo(get, agg, jobs);
        return resp.getData();
    }

    /**
     * 
     * Provides access to aggregated job metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param jobs Comma-separated list of 32-character hexadecimal strings to select specific jobs. (optional)
     * @return ApiResponse<AggregatedMetricsResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getAggregatedJobMetricsWithHttpInfo(String get, AggregationMode agg, String jobs) throws ApiException {
        okhttp3.Call call = getAggregatedJobMetricsValidateBeforeCall(get, agg, jobs, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to aggregated job metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param jobs Comma-separated list of 32-character hexadecimal strings to select specific jobs. (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 getAggregatedJobMetricsAsync(String get, AggregationMode agg, String jobs, final ApiCallback 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 = getAggregatedJobMetricsValidateBeforeCall(get, agg, jobs, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getAggregatedSubtaskMetrics
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param subtasks Comma-separated list of integer ranges (e.g. \"1,3,5-9\") to select specific subtasks. (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 getAggregatedSubtaskMetricsCall(String jobid, String vertexid, String get, AggregationMode agg, String subtasks, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/subtasks/metrics"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));
        if (agg != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("agg", agg));
        if (subtasks != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("subtasks", subtasks));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getAggregatedSubtaskMetricsValidateBeforeCall(String jobid, String vertexid, String get, AggregationMode agg, String subtasks, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'jobid' is set
        if (jobid == null) {
            throw new ApiException("Missing the required parameter 'jobid' when calling getAggregatedSubtaskMetrics(Async)");
        }
        // verify the required parameter 'vertexid' is set
        if (vertexid == null) {
            throw new ApiException("Missing the required parameter 'vertexid' when calling getAggregatedSubtaskMetrics(Async)");
        }

        okhttp3.Call call = getAggregatedSubtaskMetricsCall(jobid, vertexid, get, agg, subtasks, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to aggregated subtask metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param subtasks Comma-separated list of integer ranges (e.g. \"1,3,5-9\") to select specific subtasks. (optional)
     * @return AggregatedMetricsResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AggregatedMetricsResponseBody getAggregatedSubtaskMetrics(String jobid, String vertexid, String get, AggregationMode agg, String subtasks) throws ApiException {
        ApiResponse resp = getAggregatedSubtaskMetricsWithHttpInfo(jobid, vertexid, get, agg, subtasks);
        return resp.getData();
    }

    /**
     * 
     * Provides access to aggregated subtask metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param subtasks Comma-separated list of integer ranges (e.g. \"1,3,5-9\") to select specific subtasks. (optional)
     * @return ApiResponse<AggregatedMetricsResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getAggregatedSubtaskMetricsWithHttpInfo(String jobid, String vertexid, String get, AggregationMode agg, String subtasks) throws ApiException {
        okhttp3.Call call = getAggregatedSubtaskMetricsValidateBeforeCall(jobid, vertexid, get, agg, subtasks, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to aggregated subtask metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param subtasks Comma-separated list of integer ranges (e.g. \"1,3,5-9\") to select specific subtasks. (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 getAggregatedSubtaskMetricsAsync(String jobid, String vertexid, String get, AggregationMode agg, String subtasks, final ApiCallback 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 = getAggregatedSubtaskMetricsValidateBeforeCall(jobid, vertexid, get, agg, subtasks, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getAggregatedTaskManagerMetrics
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param taskmanagers Comma-separated list of 32-character hexadecimal strings to select specific task managers. (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 getAggregatedTaskManagerMetricsCall(String get, AggregationMode agg, String taskmanagers, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/taskmanagers/metrics";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));
        if (agg != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("agg", agg));
        if (taskmanagers != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("taskmanagers", taskmanagers));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getAggregatedTaskManagerMetricsValidateBeforeCall(String get, AggregationMode agg, String taskmanagers, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        okhttp3.Call call = getAggregatedTaskManagerMetricsCall(get, agg, taskmanagers, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to aggregated task manager metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param taskmanagers Comma-separated list of 32-character hexadecimal strings to select specific task managers. (optional)
     * @return AggregatedMetricsResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AggregatedMetricsResponseBody getAggregatedTaskManagerMetrics(String get, AggregationMode agg, String taskmanagers) throws ApiException {
        ApiResponse resp = getAggregatedTaskManagerMetricsWithHttpInfo(get, agg, taskmanagers);
        return resp.getData();
    }

    /**
     * 
     * Provides access to aggregated task manager metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param taskmanagers Comma-separated list of 32-character hexadecimal strings to select specific task managers. (optional)
     * @return ApiResponse<AggregatedMetricsResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getAggregatedTaskManagerMetricsWithHttpInfo(String get, AggregationMode agg, String taskmanagers) throws ApiException {
        okhttp3.Call call = getAggregatedTaskManagerMetricsValidateBeforeCall(get, agg, taskmanagers, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to aggregated task manager metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @param agg Comma-separated list of aggregation modes which should be calculated. Available aggregations are: \"min, max, sum, avg, skew\". (optional)
     * @param taskmanagers Comma-separated list of 32-character hexadecimal strings to select specific task managers. (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 getAggregatedTaskManagerMetricsAsync(String get, AggregationMode agg, String taskmanagers, final ApiCallback 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 = getAggregatedTaskManagerMetricsValidateBeforeCall(get, agg, taskmanagers, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getCheckpointConfig
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getCheckpointConfigCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/checkpoints/config"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the checkpointing configuration.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return CheckpointConfigInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public CheckpointConfigInfo getCheckpointConfig(String jobid) throws ApiException {
        ApiResponse resp = getCheckpointConfigWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the checkpointing configuration.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<CheckpointConfigInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getCheckpointConfigWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getCheckpointConfigValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the checkpointing configuration.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getCheckpointConfigAsync(String jobid, final ApiCallback 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 = getCheckpointConfigValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getCheckpointStatisticDetails
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (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 getCheckpointStatisticDetailsCall(String jobid, Long checkpointid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/checkpoints/details/{checkpointid}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "checkpointid" + "\\}", apiClient.escapeString(checkpointid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getCheckpointStatisticDetailsCall(jobid, checkpointid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns details for a checkpoint.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (required)
     * @return CheckpointStatistics
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public CheckpointStatistics getCheckpointStatisticDetails(String jobid, Long checkpointid) throws ApiException {
        ApiResponse resp = getCheckpointStatisticDetailsWithHttpInfo(jobid, checkpointid);
        return resp.getData();
    }

    /**
     * 
     * Returns details for a checkpoint.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (required)
     * @return ApiResponse<CheckpointStatistics>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getCheckpointStatisticDetailsWithHttpInfo(String jobid, Long checkpointid) throws ApiException {
        okhttp3.Call call = getCheckpointStatisticDetailsValidateBeforeCall(jobid, checkpointid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns details for a checkpoint.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (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 getCheckpointStatisticDetailsAsync(String jobid, Long checkpointid, final ApiCallback 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 = getCheckpointStatisticDetailsValidateBeforeCall(jobid, checkpointid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getCheckpointStatus
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getCheckpointStatusCall(String jobid, String triggerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/checkpoints/{triggerid}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "triggerid" + "\\}", apiClient.escapeString(triggerid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getCheckpointStatusCall(jobid, triggerid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the status of a checkpoint trigger operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return AsynchronousOperationResult
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AsynchronousOperationResult getCheckpointStatus(String jobid, String triggerid) throws ApiException {
        ApiResponse resp = getCheckpointStatusWithHttpInfo(jobid, triggerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the status of a checkpoint trigger operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return ApiResponse<AsynchronousOperationResult>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getCheckpointStatusWithHttpInfo(String jobid, String triggerid) throws ApiException {
        okhttp3.Call call = getCheckpointStatusValidateBeforeCall(jobid, triggerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the status of a checkpoint trigger operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getCheckpointStatusAsync(String jobid, String triggerid, final ApiCallback 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 = getCheckpointStatusValidateBeforeCall(jobid, triggerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getCheckpointingStatistics
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getCheckpointingStatisticsCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns checkpointing statistics for a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return CheckpointingStatistics
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public CheckpointingStatistics getCheckpointingStatistics(String jobid) throws ApiException {
        ApiResponse resp = getCheckpointingStatisticsWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns checkpointing statistics for a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<CheckpointingStatistics>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getCheckpointingStatisticsWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getCheckpointingStatisticsValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns checkpointing statistics for a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getCheckpointingStatisticsAsync(String jobid, final ApiCallback 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 = getCheckpointingStatisticsValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getClusterConfigurationInfo
     * @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 getClusterConfigurationInfoCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobmanager/config";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the cluster configuration.
     * @return List<ConfigurationInfoEntry>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public List getClusterConfigurationInfo() throws ApiException {
        ApiResponse> resp = getClusterConfigurationInfoWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns the cluster configuration.
     * @return ApiResponse<List<ConfigurationInfoEntry>>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse> getClusterConfigurationInfoWithHttpInfo() throws ApiException {
        okhttp3.Call call = getClusterConfigurationInfoValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the cluster configuration.
     * @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 getClusterConfigurationInfoAsync(final ApiCallback> 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 = getClusterConfigurationInfoValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getClusterDataSetDeleteStatus
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getClusterDataSetDeleteStatusCall(String triggerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the status for the delete operation of a cluster data set.
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return AsynchronousOperationResult
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AsynchronousOperationResult getClusterDataSetDeleteStatus(String triggerid) throws ApiException {
        ApiResponse resp = getClusterDataSetDeleteStatusWithHttpInfo(triggerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the status for the delete operation of a cluster data set.
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return ApiResponse<AsynchronousOperationResult>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getClusterDataSetDeleteStatusWithHttpInfo(String triggerid) throws ApiException {
        okhttp3.Call call = getClusterDataSetDeleteStatusValidateBeforeCall(triggerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the status for the delete operation of a cluster data set.
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getClusterDataSetDeleteStatusAsync(String triggerid, final ApiCallback 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 = getClusterDataSetDeleteStatusValidateBeforeCall(triggerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getClusterDataSetList
     * @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 getClusterDataSetListCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns all cluster data sets.
     * @return ClusterDataSetListResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ClusterDataSetListResponseBody getClusterDataSetList() throws ApiException {
        ApiResponse resp = getClusterDataSetListWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns all cluster data sets.
     * @return ApiResponse<ClusterDataSetListResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getClusterDataSetListWithHttpInfo() throws ApiException {
        okhttp3.Call call = getClusterDataSetListValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns all cluster data sets.
     * @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 getClusterDataSetListAsync(final ApiCallback 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 = getClusterDataSetListValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getClusterOverview
     * @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 getClusterOverviewCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns an overview over the Flink cluster.
     * @return ClusterOverviewWithVersion
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ClusterOverviewWithVersion getClusterOverview() throws ApiException {
        ApiResponse resp = getClusterOverviewWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns an overview over the Flink cluster.
     * @return ApiResponse<ClusterOverviewWithVersion>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getClusterOverviewWithHttpInfo() throws ApiException {
        okhttp3.Call call = getClusterOverviewValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns an overview over the Flink cluster.
     * @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 getClusterOverviewAsync(final ApiCallback 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 = getClusterOverviewValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getDashboardConfiguration
     * @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 getDashboardConfigurationCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the configuration of the WebUI.
     * @return DashboardConfiguration
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public DashboardConfiguration getDashboardConfiguration() throws ApiException {
        ApiResponse resp = getDashboardConfigurationWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns the configuration of the WebUI.
     * @return ApiResponse<DashboardConfiguration>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getDashboardConfigurationWithHttpInfo() throws ApiException {
        okhttp3.Call call = getDashboardConfigurationValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the configuration of the WebUI.
     * @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 getDashboardConfigurationAsync(final ApiCallback 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 = getDashboardConfigurationValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJarList
     * @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 getJarListCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns a list of all jars previously uploaded via '/jars/upload'.
     * @return JarListInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JarListInfo getJarList() throws ApiException {
        ApiResponse resp = getJarListWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns a list of all jars previously uploaded via '/jars/upload'.
     * @return ApiResponse<JarListInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJarListWithHttpInfo() throws ApiException {
        okhttp3.Call call = getJarListValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns a list of all jars previously uploaded via '/jars/upload'.
     * @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 getJarListAsync(final ApiCallback 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 = getJarListValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobAccumulators
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param includeSerializedValue Boolean value that specifies whether serialized user task accumulators should be included in the response. (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 getJobAccumulatorsCall(String jobid, Boolean includeSerializedValue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (includeSerializedValue != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("includeSerializedValue", includeSerializedValue));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobAccumulatorsCall(jobid, includeSerializedValue, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the accumulators for all tasks of a job, aggregated across the respective subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param includeSerializedValue Boolean value that specifies whether serialized user task accumulators should be included in the response. (optional)
     * @return JobAccumulatorsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobAccumulatorsInfo getJobAccumulators(String jobid, Boolean includeSerializedValue) throws ApiException {
        ApiResponse resp = getJobAccumulatorsWithHttpInfo(jobid, includeSerializedValue);
        return resp.getData();
    }

    /**
     * 
     * Returns the accumulators for all tasks of a job, aggregated across the respective subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param includeSerializedValue Boolean value that specifies whether serialized user task accumulators should be included in the response. (optional)
     * @return ApiResponse<JobAccumulatorsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobAccumulatorsWithHttpInfo(String jobid, Boolean includeSerializedValue) throws ApiException {
        okhttp3.Call call = getJobAccumulatorsValidateBeforeCall(jobid, includeSerializedValue, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the accumulators for all tasks of a job, aggregated across the respective subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param includeSerializedValue Boolean value that specifies whether serialized user task accumulators should be included in the response. (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 getJobAccumulatorsAsync(String jobid, Boolean includeSerializedValue, final ApiCallback 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 = getJobAccumulatorsValidateBeforeCall(jobid, includeSerializedValue, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobConfig
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobConfigCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the configuration of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return JobConfigInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobConfigInfo getJobConfig(String jobid) throws ApiException {
        ApiResponse resp = getJobConfigWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the configuration of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<JobConfigInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobConfigWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobConfigValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the configuration of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobConfigAsync(String jobid, final ApiCallback 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 = getJobConfigValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobDetails
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobDetailsCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns details of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return JobDetailsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobDetailsInfo getJobDetails(String jobid) throws ApiException {
        ApiResponse resp = getJobDetailsWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns details of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<JobDetailsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobDetailsWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobDetailsValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns details of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobDetailsAsync(String jobid, final ApiCallback 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 = getJobDetailsValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobExceptions
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param maxExceptions Comma-separated list of integer values that specifies the upper limit of exceptions to return. (optional)
     * @param failureLabelFilter Collection of string values working as a filter in the form of `key:value` pairs allowing only exceptions with ALL of the specified failure labels to be returned. (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 getJobExceptionsCall(String jobid, Integer maxExceptions, FailureLabel failureLabelFilter, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (maxExceptions != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("maxExceptions", maxExceptions));
        if (failureLabelFilter != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("failureLabelFilter", failureLabelFilter));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobExceptionsCall(jobid, maxExceptions, failureLabelFilter, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the most recent exceptions that have been handled by Flink for this job. The 'exceptionHistory.truncated' flag defines whether exceptions were filtered out through the GET parameter. The backend collects only a specific amount of most recent exceptions per job. This can be configured through web.exception-history-size in the Flink configuration. The following first-level members are deprecated: 'root-exception', 'timestamp', 'all-exceptions', and 'truncated'. Use the data provided through 'exceptionHistory', instead.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param maxExceptions Comma-separated list of integer values that specifies the upper limit of exceptions to return. (optional)
     * @param failureLabelFilter Collection of string values working as a filter in the form of `key:value` pairs allowing only exceptions with ALL of the specified failure labels to be returned. (optional)
     * @return JobExceptionsInfoWithHistory
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobExceptionsInfoWithHistory getJobExceptions(String jobid, Integer maxExceptions, FailureLabel failureLabelFilter) throws ApiException {
        ApiResponse resp = getJobExceptionsWithHttpInfo(jobid, maxExceptions, failureLabelFilter);
        return resp.getData();
    }

    /**
     * 
     * Returns the most recent exceptions that have been handled by Flink for this job. The 'exceptionHistory.truncated' flag defines whether exceptions were filtered out through the GET parameter. The backend collects only a specific amount of most recent exceptions per job. This can be configured through web.exception-history-size in the Flink configuration. The following first-level members are deprecated: 'root-exception', 'timestamp', 'all-exceptions', and 'truncated'. Use the data provided through 'exceptionHistory', instead.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param maxExceptions Comma-separated list of integer values that specifies the upper limit of exceptions to return. (optional)
     * @param failureLabelFilter Collection of string values working as a filter in the form of `key:value` pairs allowing only exceptions with ALL of the specified failure labels to be returned. (optional)
     * @return ApiResponse<JobExceptionsInfoWithHistory>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobExceptionsWithHttpInfo(String jobid, Integer maxExceptions, FailureLabel failureLabelFilter) throws ApiException {
        okhttp3.Call call = getJobExceptionsValidateBeforeCall(jobid, maxExceptions, failureLabelFilter, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the most recent exceptions that have been handled by Flink for this job. The 'exceptionHistory.truncated' flag defines whether exceptions were filtered out through the GET parameter. The backend collects only a specific amount of most recent exceptions per job. This can be configured through web.exception-history-size in the Flink configuration. The following first-level members are deprecated: 'root-exception', 'timestamp', 'all-exceptions', and 'truncated'. Use the data provided through 'exceptionHistory', instead.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param maxExceptions Comma-separated list of integer values that specifies the upper limit of exceptions to return. (optional)
     * @param failureLabelFilter Collection of string values working as a filter in the form of `key:value` pairs allowing only exceptions with ALL of the specified failure labels to be returned. (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 getJobExceptionsAsync(String jobid, Integer maxExceptions, FailureLabel failureLabelFilter, final ApiCallback 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 = getJobExceptionsValidateBeforeCall(jobid, maxExceptions, failureLabelFilter, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobExecutionResult
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobExecutionResultCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/execution-result"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the result of a job execution. Gives access to the execution time of the job and to all accumulators created by this job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return JobExecutionResultResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobExecutionResultResponseBody getJobExecutionResult(String jobid) throws ApiException {
        ApiResponse resp = getJobExecutionResultWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the result of a job execution. Gives access to the execution time of the job and to all accumulators created by this job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<JobExecutionResultResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobExecutionResultWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobExecutionResultValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the result of a job execution. Gives access to the execution time of the job and to all accumulators created by this job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobExecutionResultAsync(String jobid, final ApiCallback 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 = getJobExecutionResultValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobIdsWithStatusesOverview
     * @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 getJobIdsWithStatusesOverviewCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns an overview over all jobs and their current state.
     * @return JobIdsWithStatusOverview
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobIdsWithStatusOverview getJobIdsWithStatusesOverview() throws ApiException {
        ApiResponse resp = getJobIdsWithStatusesOverviewWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns an overview over all jobs and their current state.
     * @return ApiResponse<JobIdsWithStatusOverview>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobIdsWithStatusesOverviewWithHttpInfo() throws ApiException {
        okhttp3.Call call = getJobIdsWithStatusesOverviewValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns an overview over all jobs and their current state.
     * @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 getJobIdsWithStatusesOverviewAsync(final ApiCallback 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 = getJobIdsWithStatusesOverviewValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerEnvironment
     * @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 getJobManagerEnvironmentCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobmanager/environment";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the jobmanager environment.
     * @return EnvironmentInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public EnvironmentInfo getJobManagerEnvironment() throws ApiException {
        ApiResponse resp = getJobManagerEnvironmentWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns the jobmanager environment.
     * @return ApiResponse<EnvironmentInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobManagerEnvironmentWithHttpInfo() throws ApiException {
        okhttp3.Call call = getJobManagerEnvironmentValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the jobmanager environment.
     * @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 getJobManagerEnvironmentAsync(final ApiCallback 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 = getJobManagerEnvironmentValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerJobConfiguration
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobManagerJobConfigurationCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/jobmanager/config"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the jobmanager's configuration of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return List<ConfigurationInfoEntry>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public List getJobManagerJobConfiguration(String jobid) throws ApiException {
        ApiResponse> resp = getJobManagerJobConfigurationWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the jobmanager's configuration of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<List<ConfigurationInfoEntry>>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse> getJobManagerJobConfigurationWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobManagerJobConfigurationValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the jobmanager's configuration of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobManagerJobConfigurationAsync(String jobid, final ApiCallback> 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 = getJobManagerJobConfigurationValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerJobEnvironment
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobManagerJobEnvironmentCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/jobmanager/environment"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the jobmanager's environment of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return EnvironmentInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public EnvironmentInfo getJobManagerJobEnvironment(String jobid) throws ApiException {
        ApiResponse resp = getJobManagerJobEnvironmentWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the jobmanager's environment of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<EnvironmentInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobManagerJobEnvironmentWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobManagerJobEnvironmentValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the jobmanager's environment of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobManagerJobEnvironmentAsync(String jobid, final ApiCallback 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 = getJobManagerJobEnvironmentValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerLogList
     * @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 getJobManagerLogListCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobmanager/logs";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the list of log files on the JobManager.
     * @return LogListInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public LogListInfo getJobManagerLogList() throws ApiException {
        ApiResponse resp = getJobManagerLogListWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns the list of log files on the JobManager.
     * @return ApiResponse<LogListInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobManagerLogListWithHttpInfo() throws ApiException {
        okhttp3.Call call = getJobManagerLogListValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the list of log files on the JobManager.
     * @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 getJobManagerLogListAsync(final ApiCallback 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 = getJobManagerLogListValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerLogUrl
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobManagerLogUrlCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/jobmanager/log-url"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the log url of jobmanager of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return LogUrlResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public LogUrlResponse getJobManagerLogUrl(String jobid) throws ApiException {
        ApiResponse resp = getJobManagerLogUrlWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the log url of jobmanager of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<LogUrlResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobManagerLogUrlWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobManagerLogUrlValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the log url of jobmanager of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobManagerLogUrlAsync(String jobid, final ApiCallback 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 = getJobManagerLogUrlValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerMetrics
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobManagerMetricsCall(String get, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobmanager/metrics";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Provides access to job manager metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return MetricCollectionResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MetricCollectionResponseBody getJobManagerMetrics(String get) throws ApiException {
        ApiResponse resp = getJobManagerMetricsWithHttpInfo(get);
        return resp.getData();
    }

    /**
     * 
     * Provides access to job manager metrics.
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return ApiResponse<MetricCollectionResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobManagerMetricsWithHttpInfo(String get) throws ApiException {
        okhttp3.Call call = getJobManagerMetricsValidateBeforeCall(get, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to job manager metrics.
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobManagerMetricsAsync(String get, final ApiCallback 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 = getJobManagerMetricsValidateBeforeCall(get, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerOperatorMetrics
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobManagerOperatorMetricsCall(String jobid, String vertexid, String get, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/jm-operator-metrics"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobManagerOperatorMetricsCall(jobid, vertexid, get, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to jobmanager operator metrics. This is an operator that executes on the jobmanager and the coordinator for FLIP 27 sources is one example of such an operator.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return MetricCollectionResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MetricCollectionResponseBody getJobManagerOperatorMetrics(String jobid, String vertexid, String get) throws ApiException {
        ApiResponse resp = getJobManagerOperatorMetricsWithHttpInfo(jobid, vertexid, get);
        return resp.getData();
    }

    /**
     * 
     * Provides access to jobmanager operator metrics. This is an operator that executes on the jobmanager and the coordinator for FLIP 27 sources is one example of such an operator.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return ApiResponse<MetricCollectionResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobManagerOperatorMetricsWithHttpInfo(String jobid, String vertexid, String get) throws ApiException {
        okhttp3.Call call = getJobManagerOperatorMetricsValidateBeforeCall(jobid, vertexid, get, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to jobmanager operator metrics. This is an operator that executes on the jobmanager and the coordinator for FLIP 27 sources is one example of such an operator.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobManagerOperatorMetricsAsync(String jobid, String vertexid, String get, final ApiCallback 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 = getJobManagerOperatorMetricsValidateBeforeCall(jobid, vertexid, get, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobManagerThreadDump
     * @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 getJobManagerThreadDumpCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobmanager/thread-dump";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the thread dump of the JobManager.
     * @return ThreadDumpInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ThreadDumpInfo getJobManagerThreadDump() throws ApiException {
        ApiResponse resp = getJobManagerThreadDumpWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns the thread dump of the JobManager.
     * @return ApiResponse<ThreadDumpInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobManagerThreadDumpWithHttpInfo() throws ApiException {
        okhttp3.Call call = getJobManagerThreadDumpValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the thread dump of the JobManager.
     * @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 getJobManagerThreadDumpAsync(final ApiCallback 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 = getJobManagerThreadDumpValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobMetrics
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobMetricsCall(String jobid, String get, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobMetricsCall(jobid, get, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to job metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return MetricCollectionResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MetricCollectionResponseBody getJobMetrics(String jobid, String get) throws ApiException {
        ApiResponse resp = getJobMetricsWithHttpInfo(jobid, get);
        return resp.getData();
    }

    /**
     * 
     * Provides access to job metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return ApiResponse<MetricCollectionResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobMetricsWithHttpInfo(String jobid, String get) throws ApiException {
        okhttp3.Call call = getJobMetricsValidateBeforeCall(jobid, get, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to job metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobMetricsAsync(String jobid, String get, final ApiCallback 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 = getJobMetricsValidateBeforeCall(jobid, get, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobPlan
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobPlanCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the dataflow plan of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return JobPlanInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobPlanInfo getJobPlan(String jobid) throws ApiException {
        ApiResponse resp = getJobPlanWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the dataflow plan of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<JobPlanInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobPlanWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobPlanValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the dataflow plan of a job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobPlanAsync(String jobid, final ApiCallback 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 = getJobPlanValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobResourceRequirements
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobResourceRequirementsCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/resource-requirements"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Request details on the job's resource requirements.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return JobResourceRequirementsBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobResourceRequirementsBody getJobResourceRequirements(String jobid) throws ApiException {
        ApiResponse resp = getJobResourceRequirementsWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Request details on the job's resource requirements.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<JobResourceRequirementsBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobResourceRequirementsWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobResourceRequirementsValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Request details on the job's resource requirements.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobResourceRequirementsAsync(String jobid, final ApiCallback 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 = getJobResourceRequirementsValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobStatusInfo
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobStatusInfoCall(String jobid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the current status of a job execution.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return JobStatusInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobStatusInfo getJobStatusInfo(String jobid) throws ApiException {
        ApiResponse resp = getJobStatusInfoWithHttpInfo(jobid);
        return resp.getData();
    }

    /**
     * 
     * Returns the current status of a job execution.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @return ApiResponse<JobStatusInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobStatusInfoWithHttpInfo(String jobid) throws ApiException {
        okhttp3.Call call = getJobStatusInfoValidateBeforeCall(jobid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the current status of a job execution.
     * @param jobid 32-character hexadecimal string value that identifies a job. (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 getJobStatusInfoAsync(String jobid, final ApiCallback 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 = getJobStatusInfoValidateBeforeCall(jobid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobVertexAccumulators
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexAccumulatorsCall(String jobid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/accumulators"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobVertexAccumulatorsCall(jobid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns user-defined accumulators of a task, aggregated across all subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return JobVertexAccumulatorsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobVertexAccumulatorsInfo getJobVertexAccumulators(String jobid, String vertexid) throws ApiException {
        ApiResponse resp = getJobVertexAccumulatorsWithHttpInfo(jobid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns user-defined accumulators of a task, aggregated across all subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<JobVertexAccumulatorsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobVertexAccumulatorsWithHttpInfo(String jobid, String vertexid) throws ApiException {
        okhttp3.Call call = getJobVertexAccumulatorsValidateBeforeCall(jobid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns user-defined accumulators of a task, aggregated across all subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexAccumulatorsAsync(String jobid, String vertexid, final ApiCallback 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 = getJobVertexAccumulatorsValidateBeforeCall(jobid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobVertexBackPressure
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexBackPressureCall(String jobid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/backpressure"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobVertexBackPressureCall(jobid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns back-pressure information for a job, and may initiate back-pressure sampling if necessary.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return JobVertexBackPressureInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobVertexBackPressureInfo getJobVertexBackPressure(String jobid, String vertexid) throws ApiException {
        ApiResponse resp = getJobVertexBackPressureWithHttpInfo(jobid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns back-pressure information for a job, and may initiate back-pressure sampling if necessary.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<JobVertexBackPressureInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobVertexBackPressureWithHttpInfo(String jobid, String vertexid) throws ApiException {
        okhttp3.Call call = getJobVertexBackPressureValidateBeforeCall(jobid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns back-pressure information for a job, and may initiate back-pressure sampling if necessary.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexBackPressureAsync(String jobid, String vertexid, final ApiCallback 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 = getJobVertexBackPressureValidateBeforeCall(jobid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobVertexDetails
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexDetailsCall(String jobid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobVertexDetailsCall(jobid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns details for a task, with a summary for each of its subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return JobVertexDetailsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobVertexDetailsInfo getJobVertexDetails(String jobid, String vertexid) throws ApiException {
        ApiResponse resp = getJobVertexDetailsWithHttpInfo(jobid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns details for a task, with a summary for each of its subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<JobVertexDetailsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobVertexDetailsWithHttpInfo(String jobid, String vertexid) throws ApiException {
        okhttp3.Call call = getJobVertexDetailsValidateBeforeCall(jobid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns details for a task, with a summary for each of its subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexDetailsAsync(String jobid, String vertexid, final ApiCallback 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 = getJobVertexDetailsValidateBeforeCall(jobid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobVertexFlameGraph
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param type String value that specifies the Flame Graph type. Supported options are: \"[FULL, ON_CPU, OFF_CPU]\". (optional)
     * @param subtaskindex Positive integer value that identifies a subtask. (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 getJobVertexFlameGraphCall(String jobid, String vertexid, ThreadStates type, Integer subtaskindex, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/flamegraph"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (type != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("type", type));
        if (subtaskindex != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("subtaskindex", subtaskindex));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getJobVertexFlameGraphValidateBeforeCall(String jobid, String vertexid, ThreadStates type, Integer subtaskindex, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'jobid' is set
        if (jobid == null) {
            throw new ApiException("Missing the required parameter 'jobid' when calling getJobVertexFlameGraph(Async)");
        }
        // verify the required parameter 'vertexid' is set
        if (vertexid == null) {
            throw new ApiException("Missing the required parameter 'vertexid' when calling getJobVertexFlameGraph(Async)");
        }

        okhttp3.Call call = getJobVertexFlameGraphCall(jobid, vertexid, type, subtaskindex, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns flame graph information for a vertex, and may initiate flame graph sampling if necessary.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param type String value that specifies the Flame Graph type. Supported options are: \"[FULL, ON_CPU, OFF_CPU]\". (optional)
     * @param subtaskindex Positive integer value that identifies a subtask. (optional)
     * @return VertexFlameGraph
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public VertexFlameGraph getJobVertexFlameGraph(String jobid, String vertexid, ThreadStates type, Integer subtaskindex) throws ApiException {
        ApiResponse resp = getJobVertexFlameGraphWithHttpInfo(jobid, vertexid, type, subtaskindex);
        return resp.getData();
    }

    /**
     * 
     * Returns flame graph information for a vertex, and may initiate flame graph sampling if necessary.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param type String value that specifies the Flame Graph type. Supported options are: \"[FULL, ON_CPU, OFF_CPU]\". (optional)
     * @param subtaskindex Positive integer value that identifies a subtask. (optional)
     * @return ApiResponse<VertexFlameGraph>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobVertexFlameGraphWithHttpInfo(String jobid, String vertexid, ThreadStates type, Integer subtaskindex) throws ApiException {
        okhttp3.Call call = getJobVertexFlameGraphValidateBeforeCall(jobid, vertexid, type, subtaskindex, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns flame graph information for a vertex, and may initiate flame graph sampling if necessary.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param type String value that specifies the Flame Graph type. Supported options are: \"[FULL, ON_CPU, OFF_CPU]\". (optional)
     * @param subtaskindex Positive integer value that identifies a subtask. (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 getJobVertexFlameGraphAsync(String jobid, String vertexid, ThreadStates type, Integer subtaskindex, final ApiCallback 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 = getJobVertexFlameGraphValidateBeforeCall(jobid, vertexid, type, subtaskindex, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobVertexMetrics
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobVertexMetricsCall(String jobid, String vertexid, String get, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/metrics"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobVertexMetricsCall(jobid, vertexid, get, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to task metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return MetricCollectionResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MetricCollectionResponseBody getJobVertexMetrics(String jobid, String vertexid, String get) throws ApiException {
        ApiResponse resp = getJobVertexMetricsWithHttpInfo(jobid, vertexid, get);
        return resp.getData();
    }

    /**
     * 
     * Provides access to task metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return ApiResponse<MetricCollectionResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobVertexMetricsWithHttpInfo(String jobid, String vertexid, String get) throws ApiException {
        okhttp3.Call call = getJobVertexMetricsValidateBeforeCall(jobid, vertexid, get, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to task metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getJobVertexMetricsAsync(String jobid, String vertexid, String get, final ApiCallback 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 = getJobVertexMetricsValidateBeforeCall(jobid, vertexid, get, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobVertexTaskManagers
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexTaskManagersCall(String jobid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/taskmanagers"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobVertexTaskManagersCall(jobid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns task information aggregated by task manager.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return JobVertexTaskManagersInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobVertexTaskManagersInfo getJobVertexTaskManagers(String jobid, String vertexid) throws ApiException {
        ApiResponse resp = getJobVertexTaskManagersWithHttpInfo(jobid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns task information aggregated by task manager.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<JobVertexTaskManagersInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobVertexTaskManagersWithHttpInfo(String jobid, String vertexid) throws ApiException {
        okhttp3.Call call = getJobVertexTaskManagersValidateBeforeCall(jobid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns task information aggregated by task manager.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexTaskManagersAsync(String jobid, String vertexid, final ApiCallback 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 = getJobVertexTaskManagersValidateBeforeCall(jobid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobVertexWatermarks
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexWatermarksCall(String jobid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/watermarks"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getJobVertexWatermarksCall(jobid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the watermarks for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return MetricCollectionResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MetricCollectionResponseBody getJobVertexWatermarks(String jobid, String vertexid) throws ApiException {
        ApiResponse resp = getJobVertexWatermarksWithHttpInfo(jobid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns the watermarks for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<MetricCollectionResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobVertexWatermarksWithHttpInfo(String jobid, String vertexid) throws ApiException {
        okhttp3.Call call = getJobVertexWatermarksValidateBeforeCall(jobid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the watermarks for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getJobVertexWatermarksAsync(String jobid, String vertexid, final ApiCallback 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 = getJobVertexWatermarksValidateBeforeCall(jobid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getJobsOverview
     * @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 getJobsOverviewCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/overview";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns an overview over all jobs.
     * @return MultipleJobsDetails
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MultipleJobsDetails getJobsOverview() throws ApiException {
        ApiResponse resp = getJobsOverviewWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns an overview over all jobs.
     * @return ApiResponse<MultipleJobsDetails>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getJobsOverviewWithHttpInfo() throws ApiException {
        okhttp3.Call call = getJobsOverviewValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns an overview over all jobs.
     * @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 getJobsOverviewAsync(final ApiCallback 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 = getJobsOverviewValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getRescalingStatus
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getRescalingStatusCall(String jobid, String triggerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/rescaling/{triggerid}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "triggerid" + "\\}", apiClient.escapeString(triggerid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getRescalingStatusCall(jobid, triggerid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the status of a rescaling operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return AsynchronousOperationResult
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AsynchronousOperationResult getRescalingStatus(String jobid, String triggerid) throws ApiException {
        ApiResponse resp = getRescalingStatusWithHttpInfo(jobid, triggerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the status of a rescaling operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return ApiResponse<AsynchronousOperationResult>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getRescalingStatusWithHttpInfo(String jobid, String triggerid) throws ApiException {
        okhttp3.Call call = getRescalingStatusValidateBeforeCall(jobid, triggerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the status of a rescaling operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getRescalingStatusAsync(String jobid, String triggerid, final ApiCallback 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 = getRescalingStatusValidateBeforeCall(jobid, triggerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSavepointDisposalStatus
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getSavepointDisposalStatusCall(String triggerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/savepoint-disposal/{triggerid}"
            .replaceAll("\\{" + "triggerid" + "\\}", apiClient.escapeString(triggerid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the status of a savepoint disposal operation.
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return AsynchronousOperationResult
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AsynchronousOperationResult getSavepointDisposalStatus(String triggerid) throws ApiException {
        ApiResponse resp = getSavepointDisposalStatusWithHttpInfo(triggerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the status of a savepoint disposal operation.
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return ApiResponse<AsynchronousOperationResult>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSavepointDisposalStatusWithHttpInfo(String triggerid) throws ApiException {
        okhttp3.Call call = getSavepointDisposalStatusValidateBeforeCall(triggerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the status of a savepoint disposal operation.
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getSavepointDisposalStatusAsync(String triggerid, final ApiCallback 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 = getSavepointDisposalStatusValidateBeforeCall(triggerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSavepointStatus
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getSavepointStatusCall(String jobid, String triggerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/savepoints/{triggerid}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "triggerid" + "\\}", apiClient.escapeString(triggerid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getSavepointStatusCall(jobid, triggerid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the status of a savepoint operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return AsynchronousOperationResult
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AsynchronousOperationResult getSavepointStatus(String jobid, String triggerid) throws ApiException {
        ApiResponse resp = getSavepointStatusWithHttpInfo(jobid, triggerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the status of a savepoint operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (required)
     * @return ApiResponse<AsynchronousOperationResult>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSavepointStatusWithHttpInfo(String jobid, String triggerid) throws ApiException {
        okhttp3.Call call = getSavepointStatusValidateBeforeCall(jobid, triggerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the status of a savepoint operation.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param triggerid 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered. (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 getSavepointStatusAsync(String jobid, String triggerid, final ApiCallback 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 = getSavepointStatusValidateBeforeCall(jobid, triggerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSubtaskCurrentAttemptDetails
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (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 getSubtaskCurrentAttemptDetailsCall(String jobid, String vertexid, Integer subtaskindex, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/subtasks/{subtaskindex}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()))
            .replaceAll("\\{" + "subtaskindex" + "\\}", apiClient.escapeString(subtaskindex.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getSubtaskCurrentAttemptDetailsCall(jobid, vertexid, subtaskindex, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns details of the current or latest execution attempt of a subtask.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @return SubtaskExecutionAttemptDetailsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public SubtaskExecutionAttemptDetailsInfo getSubtaskCurrentAttemptDetails(String jobid, String vertexid, Integer subtaskindex) throws ApiException {
        ApiResponse resp = getSubtaskCurrentAttemptDetailsWithHttpInfo(jobid, vertexid, subtaskindex);
        return resp.getData();
    }

    /**
     * 
     * Returns details of the current or latest execution attempt of a subtask.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @return ApiResponse<SubtaskExecutionAttemptDetailsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSubtaskCurrentAttemptDetailsWithHttpInfo(String jobid, String vertexid, Integer subtaskindex) throws ApiException {
        okhttp3.Call call = getSubtaskCurrentAttemptDetailsValidateBeforeCall(jobid, vertexid, subtaskindex, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns details of the current or latest execution attempt of a subtask.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (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 getSubtaskCurrentAttemptDetailsAsync(String jobid, String vertexid, Integer subtaskindex, final ApiCallback 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 = getSubtaskCurrentAttemptDetailsValidateBeforeCall(jobid, vertexid, subtaskindex, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSubtaskExecutionAttemptAccumulators
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (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 getSubtaskExecutionAttemptAccumulatorsCall(String jobid, String vertexid, Integer subtaskindex, Integer attempt, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/subtasks/{subtaskindex}/attempts/{attempt}/accumulators"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()))
            .replaceAll("\\{" + "subtaskindex" + "\\}", apiClient.escapeString(subtaskindex.toString()))
            .replaceAll("\\{" + "attempt" + "\\}", apiClient.escapeString(attempt.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getSubtaskExecutionAttemptAccumulatorsCall(jobid, vertexid, subtaskindex, attempt, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the accumulators of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (required)
     * @return SubtaskExecutionAttemptAccumulatorsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public SubtaskExecutionAttemptAccumulatorsInfo getSubtaskExecutionAttemptAccumulators(String jobid, String vertexid, Integer subtaskindex, Integer attempt) throws ApiException {
        ApiResponse resp = getSubtaskExecutionAttemptAccumulatorsWithHttpInfo(jobid, vertexid, subtaskindex, attempt);
        return resp.getData();
    }

    /**
     * 
     * Returns the accumulators of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (required)
     * @return ApiResponse<SubtaskExecutionAttemptAccumulatorsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSubtaskExecutionAttemptAccumulatorsWithHttpInfo(String jobid, String vertexid, Integer subtaskindex, Integer attempt) throws ApiException {
        okhttp3.Call call = getSubtaskExecutionAttemptAccumulatorsValidateBeforeCall(jobid, vertexid, subtaskindex, attempt, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the accumulators of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (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 getSubtaskExecutionAttemptAccumulatorsAsync(String jobid, String vertexid, Integer subtaskindex, Integer attempt, final ApiCallback 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 = getSubtaskExecutionAttemptAccumulatorsValidateBeforeCall(jobid, vertexid, subtaskindex, attempt, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSubtaskExecutionAttemptDetails
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (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 getSubtaskExecutionAttemptDetailsCall(String jobid, String vertexid, Integer subtaskindex, Integer attempt, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/subtasks/{subtaskindex}/attempts/{attempt}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()))
            .replaceAll("\\{" + "subtaskindex" + "\\}", apiClient.escapeString(subtaskindex.toString()))
            .replaceAll("\\{" + "attempt" + "\\}", apiClient.escapeString(attempt.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getSubtaskExecutionAttemptDetailsCall(jobid, vertexid, subtaskindex, attempt, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns details of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (required)
     * @return SubtaskExecutionAttemptDetailsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public SubtaskExecutionAttemptDetailsInfo getSubtaskExecutionAttemptDetails(String jobid, String vertexid, Integer subtaskindex, Integer attempt) throws ApiException {
        ApiResponse resp = getSubtaskExecutionAttemptDetailsWithHttpInfo(jobid, vertexid, subtaskindex, attempt);
        return resp.getData();
    }

    /**
     * 
     * Returns details of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (required)
     * @return ApiResponse<SubtaskExecutionAttemptDetailsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSubtaskExecutionAttemptDetailsWithHttpInfo(String jobid, String vertexid, Integer subtaskindex, Integer attempt) throws ApiException {
        okhttp3.Call call = getSubtaskExecutionAttemptDetailsValidateBeforeCall(jobid, vertexid, subtaskindex, attempt, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns details of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param attempt Positive integer value that identifies an execution attempt. (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 getSubtaskExecutionAttemptDetailsAsync(String jobid, String vertexid, Integer subtaskindex, Integer attempt, final ApiCallback 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 = getSubtaskExecutionAttemptDetailsValidateBeforeCall(jobid, vertexid, subtaskindex, attempt, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSubtaskMetrics
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getSubtaskMetricsCall(String jobid, String vertexid, Integer subtaskindex, String get, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/subtasks/{subtaskindex}/metrics"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()))
            .replaceAll("\\{" + "subtaskindex" + "\\}", apiClient.escapeString(subtaskindex.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getSubtaskMetricsCall(jobid, vertexid, subtaskindex, get, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to subtask metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return MetricCollectionResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MetricCollectionResponseBody getSubtaskMetrics(String jobid, String vertexid, Integer subtaskindex, String get) throws ApiException {
        ApiResponse resp = getSubtaskMetricsWithHttpInfo(jobid, vertexid, subtaskindex, get);
        return resp.getData();
    }

    /**
     * 
     * Provides access to subtask metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return ApiResponse<MetricCollectionResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSubtaskMetricsWithHttpInfo(String jobid, String vertexid, Integer subtaskindex, String get) throws ApiException {
        okhttp3.Call call = getSubtaskMetricsValidateBeforeCall(jobid, vertexid, subtaskindex, get, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to subtask metrics.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @param subtaskindex Positive integer value that identifies a subtask. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getSubtaskMetricsAsync(String jobid, String vertexid, Integer subtaskindex, String get, final ApiCallback 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 = getSubtaskMetricsValidateBeforeCall(jobid, vertexid, subtaskindex, get, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSubtasksAllAccumulators
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getSubtasksAllAccumulatorsCall(String jobid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/subtasks/accumulators"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getSubtasksAllAccumulatorsCall(jobid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns all user-defined accumulators for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return SubtasksAllAccumulatorsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public SubtasksAllAccumulatorsInfo getSubtasksAllAccumulators(String jobid, String vertexid) throws ApiException {
        ApiResponse resp = getSubtasksAllAccumulatorsWithHttpInfo(jobid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns all user-defined accumulators for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<SubtasksAllAccumulatorsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSubtasksAllAccumulatorsWithHttpInfo(String jobid, String vertexid) throws ApiException {
        okhttp3.Call call = getSubtasksAllAccumulatorsValidateBeforeCall(jobid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns all user-defined accumulators for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getSubtasksAllAccumulatorsAsync(String jobid, String vertexid, final ApiCallback 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 = getSubtasksAllAccumulatorsValidateBeforeCall(jobid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getSubtasksTimes
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getSubtasksTimesCall(String jobid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/vertices/{vertexid}/subtasktimes"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getSubtasksTimesCall(jobid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns time-related information for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return SubtasksTimesInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public SubtasksTimesInfo getSubtasksTimes(String jobid, String vertexid) throws ApiException {
        ApiResponse resp = getSubtasksTimesWithHttpInfo(jobid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns time-related information for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<SubtasksTimesInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getSubtasksTimesWithHttpInfo(String jobid, String vertexid) throws ApiException {
        okhttp3.Call call = getSubtasksTimesValidateBeforeCall(jobid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns time-related information for all subtasks of a task.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getSubtasksTimesAsync(String jobid, String vertexid, final ApiCallback 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 = getSubtasksTimesValidateBeforeCall(jobid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTaskCheckpointStatistics
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getTaskCheckpointStatisticsCall(String jobid, Long checkpointid, String vertexid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/checkpoints/details/{checkpointid}/subtasks/{vertexid}"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "checkpointid" + "\\}", apiClient.escapeString(checkpointid.toString()))
            .replaceAll("\\{" + "vertexid" + "\\}", apiClient.escapeString(vertexid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getTaskCheckpointStatisticsCall(jobid, checkpointid, vertexid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns checkpoint statistics for a task and its subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return TaskCheckpointStatisticsWithSubtaskDetails
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TaskCheckpointStatisticsWithSubtaskDetails getTaskCheckpointStatistics(String jobid, Long checkpointid, String vertexid) throws ApiException {
        ApiResponse resp = getTaskCheckpointStatisticsWithHttpInfo(jobid, checkpointid, vertexid);
        return resp.getData();
    }

    /**
     * 
     * Returns checkpoint statistics for a task and its subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (required)
     * @return ApiResponse<TaskCheckpointStatisticsWithSubtaskDetails>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTaskCheckpointStatisticsWithHttpInfo(String jobid, Long checkpointid, String vertexid) throws ApiException {
        okhttp3.Call call = getTaskCheckpointStatisticsValidateBeforeCall(jobid, checkpointid, vertexid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns checkpoint statistics for a task and its subtasks.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param checkpointid Long value that identifies a checkpoint. (required)
     * @param vertexid 32-character hexadecimal string value that identifies a job vertex. (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 getTaskCheckpointStatisticsAsync(String jobid, Long checkpointid, String vertexid, final ApiCallback 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 = getTaskCheckpointStatisticsValidateBeforeCall(jobid, checkpointid, vertexid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTaskManagerDetails
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerDetailsCall(String taskmanagerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns details for a task manager. \"metrics.memorySegmentsAvailable\" and \"metrics.memorySegmentsTotal\" are deprecated. Please use \"metrics.nettyShuffleMemorySegmentsAvailable\" and \"metrics.nettyShuffleMemorySegmentsTotal\" instead.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return TaskManagerDetailsInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TaskManagerDetailsInfo getTaskManagerDetails(String taskmanagerid) throws ApiException {
        ApiResponse resp = getTaskManagerDetailsWithHttpInfo(taskmanagerid);
        return resp.getData();
    }

    /**
     * 
     * Returns details for a task manager. \"metrics.memorySegmentsAvailable\" and \"metrics.memorySegmentsTotal\" are deprecated. Please use \"metrics.nettyShuffleMemorySegmentsAvailable\" and \"metrics.nettyShuffleMemorySegmentsTotal\" instead.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return ApiResponse<TaskManagerDetailsInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTaskManagerDetailsWithHttpInfo(String taskmanagerid) throws ApiException {
        okhttp3.Call call = getTaskManagerDetailsValidateBeforeCall(taskmanagerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns details for a task manager. \"metrics.memorySegmentsAvailable\" and \"metrics.memorySegmentsTotal\" are deprecated. Please use \"metrics.nettyShuffleMemorySegmentsAvailable\" and \"metrics.nettyShuffleMemorySegmentsTotal\" instead.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerDetailsAsync(String taskmanagerid, final ApiCallback 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 = getTaskManagerDetailsValidateBeforeCall(taskmanagerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTaskManagerLogUrl
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerLogUrlCall(String jobid, String taskmanagerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/taskmanagers/{taskmanagerid}/log-url"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()))
            .replaceAll("\\{" + "taskmanagerid" + "\\}", apiClient.escapeString(taskmanagerid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getTaskManagerLogUrlCall(jobid, taskmanagerid, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Returns the log url of jobmanager of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return LogUrlResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public LogUrlResponse getTaskManagerLogUrl(String jobid, String taskmanagerid) throws ApiException {
        ApiResponse resp = getTaskManagerLogUrlWithHttpInfo(jobid, taskmanagerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the log url of jobmanager of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return ApiResponse<LogUrlResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTaskManagerLogUrlWithHttpInfo(String jobid, String taskmanagerid) throws ApiException {
        okhttp3.Call call = getTaskManagerLogUrlValidateBeforeCall(jobid, taskmanagerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the log url of jobmanager of a specific job.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerLogUrlAsync(String jobid, String taskmanagerid, final ApiCallback 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 = getTaskManagerLogUrlValidateBeforeCall(jobid, taskmanagerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTaskManagerLogs
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerLogsCall(String taskmanagerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the list of log files on a TaskManager.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return LogListInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public LogListInfo getTaskManagerLogs(String taskmanagerid) throws ApiException {
        ApiResponse resp = getTaskManagerLogsWithHttpInfo(taskmanagerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the list of log files on a TaskManager.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return ApiResponse<LogListInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTaskManagerLogsWithHttpInfo(String taskmanagerid) throws ApiException {
        okhttp3.Call call = getTaskManagerLogsValidateBeforeCall(taskmanagerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the list of log files on a TaskManager.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerLogsAsync(String taskmanagerid, final ApiCallback 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 = getTaskManagerLogsValidateBeforeCall(taskmanagerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTaskManagerMetrics
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getTaskManagerMetricsCall(String taskmanagerid, String get, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (get != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("get", get));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = getTaskManagerMetricsCall(taskmanagerid, get, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Provides access to task manager metrics.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return MetricCollectionResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public MetricCollectionResponseBody getTaskManagerMetrics(String taskmanagerid, String get) throws ApiException {
        ApiResponse resp = getTaskManagerMetricsWithHttpInfo(taskmanagerid, get);
        return resp.getData();
    }

    /**
     * 
     * Provides access to task manager metrics.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @param get Comma-separated list of string values to select specific metrics. (optional)
     * @return ApiResponse<MetricCollectionResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTaskManagerMetricsWithHttpInfo(String taskmanagerid, String get) throws ApiException {
        okhttp3.Call call = getTaskManagerMetricsValidateBeforeCall(taskmanagerid, get, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Provides access to task manager metrics.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @param get Comma-separated list of string values to select specific metrics. (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 getTaskManagerMetricsAsync(String taskmanagerid, String get, final ApiCallback 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 = getTaskManagerMetricsValidateBeforeCall(taskmanagerid, get, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTaskManagerThreadDump
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerThreadDumpCall(String taskmanagerid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/taskmanagers/{taskmanagerid}/thread-dump"
            .replaceAll("\\{" + "taskmanagerid" + "\\}", apiClient.escapeString(taskmanagerid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns the thread dump of the requested TaskManager.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return ThreadDumpInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ThreadDumpInfo getTaskManagerThreadDump(String taskmanagerid) throws ApiException {
        ApiResponse resp = getTaskManagerThreadDumpWithHttpInfo(taskmanagerid);
        return resp.getData();
    }

    /**
     * 
     * Returns the thread dump of the requested TaskManager.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (required)
     * @return ApiResponse<ThreadDumpInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTaskManagerThreadDumpWithHttpInfo(String taskmanagerid) throws ApiException {
        okhttp3.Call call = getTaskManagerThreadDumpValidateBeforeCall(taskmanagerid, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns the thread dump of the requested TaskManager.
     * @param taskmanagerid 32-character hexadecimal string that identifies a task manager. (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 getTaskManagerThreadDumpAsync(String taskmanagerid, final ApiCallback 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 = getTaskManagerThreadDumpValidateBeforeCall(taskmanagerid, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTaskManagers
     * @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 getTaskManagersCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Returns an overview over all task managers.
     * @return TaskManagersInfo
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TaskManagersInfo getTaskManagers() throws ApiException {
        ApiResponse resp = getTaskManagersWithHttpInfo();
        return resp.getData();
    }

    /**
     * 
     * Returns an overview over all task managers.
     * @return ApiResponse<TaskManagersInfo>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTaskManagersWithHttpInfo() throws ApiException {
        okhttp3.Call call = getTaskManagersValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Returns an overview over all task managers.
     * @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 getTaskManagersAsync(final ApiCallback 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 = getTaskManagersValidateBeforeCall(progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for rescaleJob
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param parallelism Positive integer value that specifies the desired parallelism. (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 rescaleJobCall(String jobid, Integer parallelism, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (parallelism != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("parallelism", parallelism));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = rescaleJobCall(jobid, parallelism, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Triggers the rescaling of a job. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param parallelism Positive integer value that specifies the desired parallelism. (required)
     * @return TriggerResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TriggerResponse rescaleJob(String jobid, Integer parallelism) throws ApiException {
        ApiResponse resp = rescaleJobWithHttpInfo(jobid, parallelism);
        return resp.getData();
    }

    /**
     * 
     * Triggers the rescaling of a job. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param parallelism Positive integer value that specifies the desired parallelism. (required)
     * @return ApiResponse<TriggerResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse rescaleJobWithHttpInfo(String jobid, Integer parallelism) throws ApiException {
        okhttp3.Call call = rescaleJobValidateBeforeCall(jobid, parallelism, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Triggers the rescaling of a job. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param parallelism Positive integer value that specifies the desired parallelism. (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 rescaleJobAsync(String jobid, Integer parallelism, final ApiCallback 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 = rescaleJobValidateBeforeCall(jobid, parallelism, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for shutdownCluster
     * @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 shutdownClusterCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            
        };
        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Shuts down the cluster
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void shutdownCluster() throws ApiException {
        shutdownClusterWithHttpInfo();
    }

    /**
     * 
     * Shuts down the cluster
     * @return ApiResponse<Void>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse shutdownClusterWithHttpInfo() throws ApiException {
        okhttp3.Call call = shutdownClusterValidateBeforeCall(null, null);
        return apiClient.execute(call);
    }

    /**
     *  (asynchronously)
     * Shuts down the cluster
     * @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 shutdownClusterAsync(final ApiCallback 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 = shutdownClusterValidateBeforeCall(progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }
    /**
     * Build call for submitJob
     * @param request  (required)
     * @param filename  (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 submitJobCall(JobSubmitRequestBody request, List filename, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();
        if (request != null)
        localVarFormParams.put("request", request);
        if (filename != null)
        localVarFormParams.put("filename", filename);

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

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

        if(progressListener != null) {
            apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

        okhttp3.Call call = submitJobCall(request, filename, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Submits a job. This call is primarily intended to be used by the Flink client. This call expects a multipart/form-data request that consists of file uploads for the serialized JobGraph, jars and distributed cache artifacts and an attribute named \"request\" for the JSON payload.
     * @param request  (required)
     * @param filename  (required)
     * @return JobSubmitResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JobSubmitResponseBody submitJob(JobSubmitRequestBody request, List filename) throws ApiException {
        ApiResponse resp = submitJobWithHttpInfo(request, filename);
        return resp.getData();
    }

    /**
     * 
     * Submits a job. This call is primarily intended to be used by the Flink client. This call expects a multipart/form-data request that consists of file uploads for the serialized JobGraph, jars and distributed cache artifacts and an attribute named \"request\" for the JSON payload.
     * @param request  (required)
     * @param filename  (required)
     * @return ApiResponse<JobSubmitResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse submitJobWithHttpInfo(JobSubmitRequestBody request, List filename) throws ApiException {
        okhttp3.Call call = submitJobValidateBeforeCall(request, filename, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Submits a job. This call is primarily intended to be used by the Flink client. This call expects a multipart/form-data request that consists of file uploads for the serialized JobGraph, jars and distributed cache artifacts and an attribute named \"request\" for the JSON payload.
     * @param request  (required)
     * @param filename  (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 submitJobAsync(JobSubmitRequestBody request, List filename, final ApiCallback 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 = submitJobValidateBeforeCall(request, filename, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for submitJobFromJar
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param allowNonRestoredState Boolean value that specifies whether the job submission should be rejected if the savepoint contains state that cannot be mapped back to the job. (optional)
     * @param savepointPath String value that specifies the path of the savepoint to restore the job from. (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (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 submitJobFromJarCall(String jarid, JarRunRequestBody body, Boolean allowNonRestoredState, String savepointPath, String programArgs, String programArg, String entryClass, Integer parallelism, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (allowNonRestoredState != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("allowNonRestoredState", allowNonRestoredState));
        if (savepointPath != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("savepointPath", savepointPath));
        if (programArgs != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("program-args", programArgs));
        if (programArg != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("programArg", programArg));
        if (entryClass != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("entry-class", entryClass));
        if (parallelism != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("parallelism", parallelism));

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call submitJobFromJarValidateBeforeCall(String jarid, JarRunRequestBody body, Boolean allowNonRestoredState, String savepointPath, String programArgs, String programArg, String entryClass, Integer parallelism, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'jarid' is set
        if (jarid == null) {
            throw new ApiException("Missing the required parameter 'jarid' when calling submitJobFromJar(Async)");
        }

        okhttp3.Call call = submitJobFromJarCall(jarid, body, allowNonRestoredState, savepointPath, programArgs, programArg, entryClass, parallelism, progressListener, progressRequestListener);
        return call;

    }

    /**
     * 
     * Submits a job by running a jar previously uploaded via '/jars/upload'. Program arguments can be passed both via the JSON request (recommended) or query parameters.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param allowNonRestoredState Boolean value that specifies whether the job submission should be rejected if the savepoint contains state that cannot be mapped back to the job. (optional)
     * @param savepointPath String value that specifies the path of the savepoint to restore the job from. (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (optional)
     * @return JarRunResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JarRunResponseBody submitJobFromJar(String jarid, JarRunRequestBody body, Boolean allowNonRestoredState, String savepointPath, String programArgs, String programArg, String entryClass, Integer parallelism) throws ApiException {
        ApiResponse resp = submitJobFromJarWithHttpInfo(jarid, body, allowNonRestoredState, savepointPath, programArgs, programArg, entryClass, parallelism);
        return resp.getData();
    }

    /**
     * 
     * Submits a job by running a jar previously uploaded via '/jars/upload'. Program arguments can be passed both via the JSON request (recommended) or query parameters.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param allowNonRestoredState Boolean value that specifies whether the job submission should be rejected if the savepoint contains state that cannot be mapped back to the job. (optional)
     * @param savepointPath String value that specifies the path of the savepoint to restore the job from. (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (optional)
     * @return ApiResponse<JarRunResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse submitJobFromJarWithHttpInfo(String jarid, JarRunRequestBody body, Boolean allowNonRestoredState, String savepointPath, String programArgs, String programArg, String entryClass, Integer parallelism) throws ApiException {
        okhttp3.Call call = submitJobFromJarValidateBeforeCall(jarid, body, allowNonRestoredState, savepointPath, programArgs, programArg, entryClass, parallelism, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Submits a job by running a jar previously uploaded via '/jars/upload'. Program arguments can be passed both via the JSON request (recommended) or query parameters.
     * @param jarid String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the `id` field in the list of uploaded jars (/jars). (required)
     * @param body  (optional)
     * @param allowNonRestoredState Boolean value that specifies whether the job submission should be rejected if the savepoint contains state that cannot be mapped back to the job. (optional)
     * @param savepointPath String value that specifies the path of the savepoint to restore the job from. (optional)
     * @param programArgs Deprecated, please use 'programArg' instead. String value that specifies the arguments for the program or plan (optional)
     * @param programArg Comma-separated list of program arguments. (optional)
     * @param entryClass String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest. (optional)
     * @param parallelism Positive integer value that specifies the desired parallelism for the job. (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 submitJobFromJarAsync(String jarid, JarRunRequestBody body, Boolean allowNonRestoredState, String savepointPath, String programArgs, String programArg, String entryClass, Integer parallelism, final ApiCallback 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 = submitJobFromJarValidateBeforeCall(jarid, body, allowNonRestoredState, savepointPath, programArgs, programArg, entryClass, parallelism, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for triggerCheckpoint
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerCheckpointCall(String jobid, CheckpointTriggerRequestBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Triggers a checkpoint. The 'checkpointType' parameter does not support 'INCREMENTAL' option for now. See FLINK-33723. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return TriggerResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TriggerResponse triggerCheckpoint(String jobid, CheckpointTriggerRequestBody body) throws ApiException {
        ApiResponse resp = triggerCheckpointWithHttpInfo(jobid, body);
        return resp.getData();
    }

    /**
     * 
     * Triggers a checkpoint. The 'checkpointType' parameter does not support 'INCREMENTAL' option for now. See FLINK-33723. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return ApiResponse<TriggerResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse triggerCheckpointWithHttpInfo(String jobid, CheckpointTriggerRequestBody body) throws ApiException {
        okhttp3.Call call = triggerCheckpointValidateBeforeCall(jobid, body, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Triggers a checkpoint. The 'checkpointType' parameter does not support 'INCREMENTAL' option for now. See FLINK-33723. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerCheckpointAsync(String jobid, CheckpointTriggerRequestBody body, final ApiCallback 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 = triggerCheckpointValidateBeforeCall(jobid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for triggerHeartbeat
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerHeartbeatCall(String jobid, JobClientHeartbeatRequestBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            
        };
        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Report the jobClient's aliveness.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void triggerHeartbeat(String jobid, JobClientHeartbeatRequestBody body) throws ApiException {
        triggerHeartbeatWithHttpInfo(jobid, body);
    }

    /**
     * 
     * Report the jobClient's aliveness.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return ApiResponse<Void>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse triggerHeartbeatWithHttpInfo(String jobid, JobClientHeartbeatRequestBody body) throws ApiException {
        okhttp3.Call call = triggerHeartbeatValidateBeforeCall(jobid, body, null, null);
        return apiClient.execute(call);
    }

    /**
     *  (asynchronously)
     * Report the jobClient's aliveness.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerHeartbeatAsync(String jobid, JobClientHeartbeatRequestBody body, final ApiCallback 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 = triggerHeartbeatValidateBeforeCall(jobid, body, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }
    /**
     * Build call for triggerSavepoint
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerSavepointCall(String jobid, SavepointTriggerRequestBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Triggers a savepoint, and optionally cancels the job afterwards. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return TriggerResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TriggerResponse triggerSavepoint(String jobid, SavepointTriggerRequestBody body) throws ApiException {
        ApiResponse resp = triggerSavepointWithHttpInfo(jobid, body);
        return resp.getData();
    }

    /**
     * 
     * Triggers a savepoint, and optionally cancels the job afterwards. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return ApiResponse<TriggerResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse triggerSavepointWithHttpInfo(String jobid, SavepointTriggerRequestBody body) throws ApiException {
        okhttp3.Call call = triggerSavepointValidateBeforeCall(jobid, body, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Triggers a savepoint, and optionally cancels the job afterwards. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerSavepointAsync(String jobid, SavepointTriggerRequestBody body, final ApiCallback 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 = triggerSavepointValidateBeforeCall(jobid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for triggerSavepointDisposal
     * @param body  (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 triggerSavepointDisposalCall(SavepointDisposalRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/savepoint-disposal";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Triggers the desposal of a savepoint. This async operation would return a 'triggerid' for further query identifier.
     * @param body  (optional)
     * @return TriggerResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TriggerResponse triggerSavepointDisposal(SavepointDisposalRequest body) throws ApiException {
        ApiResponse resp = triggerSavepointDisposalWithHttpInfo(body);
        return resp.getData();
    }

    /**
     * 
     * Triggers the desposal of a savepoint. This async operation would return a 'triggerid' for further query identifier.
     * @param body  (optional)
     * @return ApiResponse<TriggerResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse triggerSavepointDisposalWithHttpInfo(SavepointDisposalRequest body) throws ApiException {
        okhttp3.Call call = triggerSavepointDisposalValidateBeforeCall(body, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Triggers the desposal of a savepoint. This async operation would return a 'triggerid' for further query identifier.
     * @param body  (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 triggerSavepointDisposalAsync(SavepointDisposalRequest body, final ApiCallback 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 = triggerSavepointDisposalValidateBeforeCall(body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for triggerStopWithSavepoint
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerStopWithSavepointCall(String jobid, StopWithSavepointRequestBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

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

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Stops a job with a savepoint. Optionally, it can also emit a MAX_WATERMARK before taking the savepoint to flush out any state waiting for timers to fire. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return TriggerResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TriggerResponse triggerStopWithSavepoint(String jobid, StopWithSavepointRequestBody body) throws ApiException {
        ApiResponse resp = triggerStopWithSavepointWithHttpInfo(jobid, body);
        return resp.getData();
    }

    /**
     * 
     * Stops a job with a savepoint. Optionally, it can also emit a MAX_WATERMARK before taking the savepoint to flush out any state waiting for timers to fire. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return ApiResponse<TriggerResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse triggerStopWithSavepointWithHttpInfo(String jobid, StopWithSavepointRequestBody body) throws ApiException {
        okhttp3.Call call = triggerStopWithSavepointValidateBeforeCall(jobid, body, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Stops a job with a savepoint. Optionally, it can also emit a MAX_WATERMARK before taking the savepoint to flush out any state waiting for timers to fire. This async operation would return a 'triggerid' for further query identifier.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 triggerStopWithSavepointAsync(String jobid, StopWithSavepointRequestBody body, final ApiCallback 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 = triggerStopWithSavepointValidateBeforeCall(jobid, body, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for updateJobResourceRequirements
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 updateJobResourceRequirementsCall(String jobid, Map body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/jobs/{jobid}/resource-requirements"
            .replaceAll("\\{" + "jobid" + "\\}", apiClient.escapeString(jobid.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            
        };
        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.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Request to update job's resource requirements.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void updateJobResourceRequirements(String jobid, Map body) throws ApiException {
        updateJobResourceRequirementsWithHttpInfo(jobid, body);
    }

    /**
     * 
     * Request to update job's resource requirements.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (optional)
     * @return ApiResponse<Void>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse updateJobResourceRequirementsWithHttpInfo(String jobid, Map body) throws ApiException {
        okhttp3.Call call = updateJobResourceRequirementsValidateBeforeCall(jobid, body, null, null);
        return apiClient.execute(call);
    }

    /**
     *  (asynchronously)
     * Request to update job's resource requirements.
     * @param jobid 32-character hexadecimal string value that identifies a job. (required)
     * @param body  (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 updateJobResourceRequirementsAsync(String jobid, Map body, final ApiCallback 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 = updateJobResourceRequirementsValidateBeforeCall(jobid, body, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }
    /**
     * Build call for uploadJar
     * @param jarfile  (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 uploadJarCall(File jarfile, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/jars/upload";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();

        Map localVarFormParams = new HashMap();
        if (jarfile != null)
        localVarFormParams.put("jarfile", jarfile);

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

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

        if(progressListener != null) {
            apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addInterceptor(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();
                }
            }).build());
        }

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

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

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

    }

    /**
     * 
     * Uploads a jar to the cluster. The jar must be sent as multi-part data. Make sure that the \"Content-Type\" header is set to \"application/x-java-archive\", as some http libraries do not add the header by default. Using 'curl' you can upload a jar via 'curl -X POST -H \"Expect:\" -F \"jarfile=@path/to/flink-job.jar\" http://hostname:port/jars/upload'.
     * @param jarfile  (required)
     * @return JarUploadResponseBody
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public JarUploadResponseBody uploadJar(File jarfile) throws ApiException {
        ApiResponse resp = uploadJarWithHttpInfo(jarfile);
        return resp.getData();
    }

    /**
     * 
     * Uploads a jar to the cluster. The jar must be sent as multi-part data. Make sure that the \"Content-Type\" header is set to \"application/x-java-archive\", as some http libraries do not add the header by default. Using 'curl' you can upload a jar via 'curl -X POST -H \"Expect:\" -F \"jarfile=@path/to/flink-job.jar\" http://hostname:port/jars/upload'.
     * @param jarfile  (required)
     * @return ApiResponse<JarUploadResponseBody>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse uploadJarWithHttpInfo(File jarfile) throws ApiException {
        okhttp3.Call call = uploadJarValidateBeforeCall(jarfile, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Uploads a jar to the cluster. The jar must be sent as multi-part data. Make sure that the \"Content-Type\" header is set to \"application/x-java-archive\", as some http libraries do not add the header by default. Using 'curl' you can upload a jar via 'curl -X POST -H \"Expect:\" -F \"jarfile=@path/to/flink-job.jar\" http://hostname:port/jars/upload'.
     * @param jarfile  (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 uploadJarAsync(File jarfile, final ApiCallback 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 = uploadJarValidateBeforeCall(jarfile, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy