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

com.finbourne.workflow.api.TaskDefinitionsApi Maven / Gradle / Ivy

There is a newer version: 2.0.166
Show newest version
/*
 * FINBOURNE Workflow API
 *
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.finbourne.workflow.api;

import com.finbourne.workflow.ApiCallback;
import com.finbourne.workflow.ApiClient;
import com.finbourne.workflow.ApiException;
import com.finbourne.workflow.ApiResponse;
import com.finbourne.workflow.Configuration;
import com.finbourne.workflow.Pair;
import com.finbourne.workflow.ProgressRequestBody;
import com.finbourne.workflow.ProgressResponseBody;
import com.finbourne.workflow.extensions.ConfigurationOptions;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.finbourne.workflow.model.CreateTaskDefinitionRequest;
import com.finbourne.workflow.model.DeletedEntityResponse;
import com.finbourne.workflow.model.LusidProblemDetails;
import com.finbourne.workflow.model.LusidValidationProblemDetails;
import java.time.OffsetDateTime;
import com.finbourne.workflow.model.PagedResourceListOfTaskDefinition;
import com.finbourne.workflow.model.ResourceListOfTask;
import com.finbourne.workflow.model.TaskDefinition;
import com.finbourne.workflow.model.UpdateTaskDefinitionRequest;

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

public class TaskDefinitionsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public TaskDefinitionsApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    private okhttp3.Call createTaskDefinitionCall(CreateTaskDefinitionRequest createTaskDefinitionRequest, final ApiCallback _callback) throws ApiException {
        return createTaskDefinitionCall(createTaskDefinitionRequest,  _callback, new ConfigurationOptions());
    }

    private okhttp3.Call createTaskDefinitionCall(CreateTaskDefinitionRequest createTaskDefinitionRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = createTaskDefinitionRequest;

        // create path and map variables
        String localVarPath = "/api/taskdefinitions";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

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

        final String[] localVarContentTypes = {
            "application/json-patch+json",
            "application/json",
            "text/json",
            "application/*+json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createTaskDefinitionValidateBeforeCall(CreateTaskDefinitionRequest createTaskDefinitionRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
        // verify the required parameter 'createTaskDefinitionRequest' is set
        if (createTaskDefinitionRequest == null) {
            throw new ApiException("Missing the required parameter 'createTaskDefinitionRequest' when calling createTaskDefinition(Async)");
        }

        return createTaskDefinitionCall(createTaskDefinitionRequest, _callback, opts);

    }


    private ApiResponse createTaskDefinitionWithHttpInfo(CreateTaskDefinitionRequest createTaskDefinitionRequest) throws ApiException {
        okhttp3.Call localVarCall = createTaskDefinitionValidateBeforeCall(createTaskDefinitionRequest, null, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private ApiResponse createTaskDefinitionWithHttpInfo(CreateTaskDefinitionRequest createTaskDefinitionRequest, ConfigurationOptions opts) throws ApiException {
        okhttp3.Call localVarCall = createTaskDefinitionValidateBeforeCall(createTaskDefinitionRequest, null, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call createTaskDefinitionAsync(CreateTaskDefinitionRequest createTaskDefinitionRequest, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = createTaskDefinitionValidateBeforeCall(createTaskDefinitionRequest, _callback, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    private okhttp3.Call createTaskDefinitionAsync(CreateTaskDefinitionRequest createTaskDefinitionRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {

        okhttp3.Call localVarCall = createTaskDefinitionValidateBeforeCall(createTaskDefinitionRequest, _callback, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class APIcreateTaskDefinitionRequest {
        private final CreateTaskDefinitionRequest createTaskDefinitionRequest;

        private APIcreateTaskDefinitionRequest(CreateTaskDefinitionRequest createTaskDefinitionRequest) {
            this.createTaskDefinitionRequest = createTaskDefinitionRequest;
        }

        /**
         * Build call for createTaskDefinition
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createTaskDefinitionCall(createTaskDefinitionRequest, _callback); } /** * Execute createTaskDefinition request * @return TaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public TaskDefinition execute() throws ApiException { ApiResponse localVarResp = createTaskDefinitionWithHttpInfo(createTaskDefinitionRequest); return localVarResp.getData(); } /** * Execute createTaskDefinition request. Use any specified configuration options to override any other configuration for this request only. * @return TaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public TaskDefinition execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = createTaskDefinitionWithHttpInfo(createTaskDefinitionRequest, opts); return localVarResp.getData(); } /** * Execute createTaskDefinition request with HTTP info returned * @return ApiResponse<TaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return createTaskDefinitionWithHttpInfo(createTaskDefinitionRequest); } /** * Execute createTaskDefinition request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<TaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return createTaskDefinitionWithHttpInfo(createTaskDefinitionRequest, opts); } /** * Execute createTaskDefinition request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createTaskDefinitionAsync(createTaskDefinitionRequest, _callback); } /** * Execute createTaskDefinition request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return createTaskDefinitionAsync(createTaskDefinitionRequest, _callback, opts); } } /** * [EXPERIMENTAL] CreateTaskDefinition: Create a new Task Definition * * @param createTaskDefinitionRequest The data to create a Task Definition (required) * @return APIcreateTaskDefinitionRequest * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public APIcreateTaskDefinitionRequest createTaskDefinition(CreateTaskDefinitionRequest createTaskDefinitionRequest) { return new APIcreateTaskDefinitionRequest(createTaskDefinitionRequest); } private okhttp3.Call deleteTaskDefinitionCall(String scope, String code, final ApiCallback _callback) throws ApiException { return deleteTaskDefinitionCall(scope, code, _callback, new ConfigurationOptions()); } private okhttp3.Call deleteTaskDefinitionCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/taskdefinitions/{scope}/{code}" .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteTaskDefinitionValidateBeforeCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling deleteTaskDefinition(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling deleteTaskDefinition(Async)"); } return deleteTaskDefinitionCall(scope, code, _callback, opts); } private ApiResponse deleteTaskDefinitionWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = deleteTaskDefinitionValidateBeforeCall(scope, code, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse deleteTaskDefinitionWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deleteTaskDefinitionValidateBeforeCall(scope, code, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteTaskDefinitionAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteTaskDefinitionValidateBeforeCall(scope, code, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call deleteTaskDefinitionAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deleteTaskDefinitionValidateBeforeCall(scope, code, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteTaskDefinitionRequest { private final String scope; private final String code; private APIdeleteTaskDefinitionRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Build call for deleteTaskDefinition * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteTaskDefinitionCall(scope, code, _callback); } /** * Execute deleteTaskDefinition request * @return DeletedEntityResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public DeletedEntityResponse execute() throws ApiException { ApiResponse localVarResp = deleteTaskDefinitionWithHttpInfo(scope, code); return localVarResp.getData(); } /** * Execute deleteTaskDefinition request. Use any specified configuration options to override any other configuration for this request only. * @return DeletedEntityResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public DeletedEntityResponse execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = deleteTaskDefinitionWithHttpInfo(scope, code, opts); return localVarResp.getData(); } /** * Execute deleteTaskDefinition request with HTTP info returned * @return ApiResponse<DeletedEntityResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteTaskDefinitionWithHttpInfo(scope, code); } /** * Execute deleteTaskDefinition request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<DeletedEntityResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return deleteTaskDefinitionWithHttpInfo(scope, code, opts); } /** * Execute deleteTaskDefinition request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteTaskDefinitionAsync(scope, code, _callback); } /** * Execute deleteTaskDefinition request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return deleteTaskDefinitionAsync(scope, code, _callback, opts); } } /** * [EXPERIMENTAL] DeleteTaskDefinition: Delete a Task Definition * * @param scope The scope that identifies a Task Definition (required) * @param code The code that identifies a Task Definition (required) * @return APIdeleteTaskDefinitionRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public APIdeleteTaskDefinitionRequest deleteTaskDefinition(String scope, String code) { return new APIdeleteTaskDefinitionRequest(scope, code); } private okhttp3.Call getTaskDefinitionCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { return getTaskDefinitionCall(scope, code, asAt, _callback, new ConfigurationOptions()); } private okhttp3.Call getTaskDefinitionCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/taskdefinitions/{scope}/{code}" .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (asAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call getTaskDefinitionValidateBeforeCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling getTaskDefinition(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling getTaskDefinition(Async)"); } return getTaskDefinitionCall(scope, code, asAt, _callback, opts); } private ApiResponse getTaskDefinitionWithHttpInfo(String scope, String code, OffsetDateTime asAt) throws ApiException { okhttp3.Call localVarCall = getTaskDefinitionValidateBeforeCall(scope, code, asAt, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse getTaskDefinitionWithHttpInfo(String scope, String code, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getTaskDefinitionValidateBeforeCall(scope, code, asAt, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getTaskDefinitionAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTaskDefinitionValidateBeforeCall(scope, code, asAt, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call getTaskDefinitionAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getTaskDefinitionValidateBeforeCall(scope, code, asAt, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetTaskDefinitionRequest { private final String scope; private final String code; private OffsetDateTime asAt; private APIgetTaskDefinitionRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Set asAt * @param asAt The asAt datetime at which to retrieve the Task Definition. Defaults to returning the latest version of the Task Definition if not specified. (optional) * @return APIgetTaskDefinitionRequest */ public APIgetTaskDefinitionRequest asAt(OffsetDateTime asAt) { this.asAt = asAt; return this; } /** * Build call for getTaskDefinition * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getTaskDefinitionCall(scope, code, asAt, _callback); } /** * Execute getTaskDefinition request * @return TaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public TaskDefinition execute() throws ApiException { ApiResponse localVarResp = getTaskDefinitionWithHttpInfo(scope, code, asAt); return localVarResp.getData(); } /** * Execute getTaskDefinition request. Use any specified configuration options to override any other configuration for this request only. * @return TaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public TaskDefinition execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = getTaskDefinitionWithHttpInfo(scope, code, asAt, opts); return localVarResp.getData(); } /** * Execute getTaskDefinition request with HTTP info returned * @return ApiResponse<TaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getTaskDefinitionWithHttpInfo(scope, code, asAt); } /** * Execute getTaskDefinition request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<TaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return getTaskDefinitionWithHttpInfo(scope, code, asAt, opts); } /** * Execute getTaskDefinition request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getTaskDefinitionAsync(scope, code, asAt, _callback); } /** * Execute getTaskDefinition request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return getTaskDefinitionAsync(scope, code, asAt, _callback, opts); } } /** * [EXPERIMENTAL] GetTaskDefinition: Get a Task Definition * * @param scope The scope that identifies a Task Definition (required) * @param code The code that identifies a Task Definition (required) * @return APIgetTaskDefinitionRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public APIgetTaskDefinitionRequest getTaskDefinition(String scope, String code) { return new APIgetTaskDefinitionRequest(scope, code); } private okhttp3.Call listTaskDefinitionsCall(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback) throws ApiException { return listTaskDefinitionsCall(asAt, filter, sortBy, limit, page, _callback, new ConfigurationOptions()); } private okhttp3.Call listTaskDefinitionsCall(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/taskdefinitions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (asAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (sortBy != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call listTaskDefinitionsValidateBeforeCall(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listTaskDefinitionsCall(asAt, filter, sortBy, limit, page, _callback, opts); } private ApiResponse listTaskDefinitionsWithHttpInfo(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page) throws ApiException { okhttp3.Call localVarCall = listTaskDefinitionsValidateBeforeCall(asAt, filter, sortBy, limit, page, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse listTaskDefinitionsWithHttpInfo(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listTaskDefinitionsValidateBeforeCall(asAt, filter, sortBy, limit, page, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listTaskDefinitionsAsync(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listTaskDefinitionsValidateBeforeCall(asAt, filter, sortBy, limit, page, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call listTaskDefinitionsAsync(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listTaskDefinitionsValidateBeforeCall(asAt, filter, sortBy, limit, page, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistTaskDefinitionsRequest { private OffsetDateTime asAt; private String filter; private List sortBy; private Integer limit; private String page; private APIlistTaskDefinitionsRequest() { } /** * Set asAt * @param asAt The asAt datetime at which to list the Task Definitions. Defaults to return the latest version of each Task Definition if not specified. (optional) * @return APIlistTaskDefinitionsRequest */ public APIlistTaskDefinitionsRequest asAt(OffsetDateTime asAt) { this.asAt = asAt; return this; } /** * Set filter * @param filter Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid. (optional) * @return APIlistTaskDefinitionsRequest */ public APIlistTaskDefinitionsRequest filter(String filter) { this.filter = filter; return this; } /** * Set sortBy * @param sortBy A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" (optional) * @return APIlistTaskDefinitionsRequest */ public APIlistTaskDefinitionsRequest sortBy(List sortBy) { this.sortBy = sortBy; return this; } /** * Set limit * @param limit When paginating, limit the number of returned results to this many. (optional, default to 10) * @return APIlistTaskDefinitionsRequest */ public APIlistTaskDefinitionsRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set page * @param page The pagination token to use to continue listing task definitions from a previous call to list task definitions. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request. (optional) * @return APIlistTaskDefinitionsRequest */ public APIlistTaskDefinitionsRequest page(String page) { this.page = page; return this; } /** * Build call for listTaskDefinitions * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listTaskDefinitionsCall(asAt, filter, sortBy, limit, page, _callback); } /** * Execute listTaskDefinitions request * @return PagedResourceListOfTaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public PagedResourceListOfTaskDefinition execute() throws ApiException { ApiResponse localVarResp = listTaskDefinitionsWithHttpInfo(asAt, filter, sortBy, limit, page); return localVarResp.getData(); } /** * Execute listTaskDefinitions request. Use any specified configuration options to override any other configuration for this request only. * @return PagedResourceListOfTaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public PagedResourceListOfTaskDefinition execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = listTaskDefinitionsWithHttpInfo(asAt, filter, sortBy, limit, page, opts); return localVarResp.getData(); } /** * Execute listTaskDefinitions request with HTTP info returned * @return ApiResponse<PagedResourceListOfTaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listTaskDefinitionsWithHttpInfo(asAt, filter, sortBy, limit, page); } /** * Execute listTaskDefinitions request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<PagedResourceListOfTaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return listTaskDefinitionsWithHttpInfo(asAt, filter, sortBy, limit, page, opts); } /** * Execute listTaskDefinitions request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listTaskDefinitionsAsync(asAt, filter, sortBy, limit, page, _callback); } /** * Execute listTaskDefinitions request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listTaskDefinitionsAsync(asAt, filter, sortBy, limit, page, _callback, opts); } } /** * [EXPERIMENTAL] ListTaskDefinitions: List Task Definitions * * @return APIlistTaskDefinitionsRequest * @http.response.details
Status Code Description Response Headers
200 List of Task Definitions -
400 The details of the input related failure -
404 No Task Definitions found. -
0 Error response -
*/ public APIlistTaskDefinitionsRequest listTaskDefinitions() { return new APIlistTaskDefinitionsRequest(); } private okhttp3.Call listTasksForTaskDefinitionCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { return listTasksForTaskDefinitionCall(scope, code, asAt, _callback, new ConfigurationOptions()); } private okhttp3.Call listTasksForTaskDefinitionCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/taskdefinitions/{scope}/{code}/tasks" .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (asAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call listTasksForTaskDefinitionValidateBeforeCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling listTasksForTaskDefinition(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling listTasksForTaskDefinition(Async)"); } return listTasksForTaskDefinitionCall(scope, code, asAt, _callback, opts); } private ApiResponse listTasksForTaskDefinitionWithHttpInfo(String scope, String code, OffsetDateTime asAt) throws ApiException { okhttp3.Call localVarCall = listTasksForTaskDefinitionValidateBeforeCall(scope, code, asAt, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse listTasksForTaskDefinitionWithHttpInfo(String scope, String code, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listTasksForTaskDefinitionValidateBeforeCall(scope, code, asAt, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listTasksForTaskDefinitionAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listTasksForTaskDefinitionValidateBeforeCall(scope, code, asAt, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call listTasksForTaskDefinitionAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listTasksForTaskDefinitionValidateBeforeCall(scope, code, asAt, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistTasksForTaskDefinitionRequest { private final String scope; private final String code; private OffsetDateTime asAt; private APIlistTasksForTaskDefinitionRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Set asAt * @param asAt The asAt datetime at which to list the Tasks. Defaults to return the latest version of each Task if not specified. (optional) * @return APIlistTasksForTaskDefinitionRequest */ public APIlistTasksForTaskDefinitionRequest asAt(OffsetDateTime asAt) { this.asAt = asAt; return this; } /** * Build call for listTasksForTaskDefinition * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listTasksForTaskDefinitionCall(scope, code, asAt, _callback); } /** * Execute listTasksForTaskDefinition request * @return ResourceListOfTask * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public ResourceListOfTask execute() throws ApiException { ApiResponse localVarResp = listTasksForTaskDefinitionWithHttpInfo(scope, code, asAt); return localVarResp.getData(); } /** * Execute listTasksForTaskDefinition request. Use any specified configuration options to override any other configuration for this request only. * @return ResourceListOfTask * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public ResourceListOfTask execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = listTasksForTaskDefinitionWithHttpInfo(scope, code, asAt, opts); return localVarResp.getData(); } /** * Execute listTasksForTaskDefinition request with HTTP info returned * @return ApiResponse<ResourceListOfTask> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listTasksForTaskDefinitionWithHttpInfo(scope, code, asAt); } /** * Execute listTasksForTaskDefinition request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<ResourceListOfTask> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return listTasksForTaskDefinitionWithHttpInfo(scope, code, asAt, opts); } /** * Execute listTasksForTaskDefinition request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listTasksForTaskDefinitionAsync(scope, code, asAt, _callback); } /** * Execute listTasksForTaskDefinition request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listTasksForTaskDefinitionAsync(scope, code, asAt, _callback, opts); } } /** * [EXPERIMENTAL] ListTasksForTaskDefinition: List Tasks for a Task Definition * * @param scope The scope that identifies a Task Definition (required) * @param code The code that identifies a Task Definition (required) * @return APIlistTasksForTaskDefinitionRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No tasks found for this Task Definition. -
0 Error response -
*/ public APIlistTasksForTaskDefinitionRequest listTasksForTaskDefinition(String scope, String code) { return new APIlistTasksForTaskDefinitionRequest(scope, code); } private okhttp3.Call updateTaskDefinitionCall(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest, final ApiCallback _callback) throws ApiException { return updateTaskDefinitionCall(scope, code, updateTaskDefinitionRequest, _callback, new ConfigurationOptions()); } private okhttp3.Call updateTaskDefinitionCall(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateTaskDefinitionRequest; // create path and map variables String localVarPath = "/api/taskdefinitions/{scope}/{code}" .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json-patch+json", "application/json", "text/json", "application/*+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call updateTaskDefinitionValidateBeforeCall(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling updateTaskDefinition(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling updateTaskDefinition(Async)"); } // verify the required parameter 'updateTaskDefinitionRequest' is set if (updateTaskDefinitionRequest == null) { throw new ApiException("Missing the required parameter 'updateTaskDefinitionRequest' when calling updateTaskDefinition(Async)"); } return updateTaskDefinitionCall(scope, code, updateTaskDefinitionRequest, _callback, opts); } private ApiResponse updateTaskDefinitionWithHttpInfo(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest) throws ApiException { okhttp3.Call localVarCall = updateTaskDefinitionValidateBeforeCall(scope, code, updateTaskDefinitionRequest, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse updateTaskDefinitionWithHttpInfo(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updateTaskDefinitionValidateBeforeCall(scope, code, updateTaskDefinitionRequest, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updateTaskDefinitionAsync(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateTaskDefinitionValidateBeforeCall(scope, code, updateTaskDefinitionRequest, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call updateTaskDefinitionAsync(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updateTaskDefinitionValidateBeforeCall(scope, code, updateTaskDefinitionRequest, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIupdateTaskDefinitionRequest { private final String scope; private final String code; private final UpdateTaskDefinitionRequest updateTaskDefinitionRequest; private APIupdateTaskDefinitionRequest(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest) { this.scope = scope; this.code = code; this.updateTaskDefinitionRequest = updateTaskDefinitionRequest; } /** * Build call for updateTaskDefinition * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updateTaskDefinitionCall(scope, code, updateTaskDefinitionRequest, _callback); } /** * Execute updateTaskDefinition request * @return TaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public TaskDefinition execute() throws ApiException { ApiResponse localVarResp = updateTaskDefinitionWithHttpInfo(scope, code, updateTaskDefinitionRequest); return localVarResp.getData(); } /** * Execute updateTaskDefinition request. Use any specified configuration options to override any other configuration for this request only. * @return TaskDefinition * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public TaskDefinition execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = updateTaskDefinitionWithHttpInfo(scope, code, updateTaskDefinitionRequest, opts); return localVarResp.getData(); } /** * Execute updateTaskDefinition request with HTTP info returned * @return ApiResponse<TaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return updateTaskDefinitionWithHttpInfo(scope, code, updateTaskDefinitionRequest); } /** * Execute updateTaskDefinition request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<TaskDefinition> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return updateTaskDefinitionWithHttpInfo(scope, code, updateTaskDefinitionRequest, opts); } /** * Execute updateTaskDefinition request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updateTaskDefinitionAsync(scope, code, updateTaskDefinitionRequest, _callback); } /** * Execute updateTaskDefinition request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return updateTaskDefinitionAsync(scope, code, updateTaskDefinitionRequest, _callback, opts); } } /** * [EXPERIMENTAL] UpdateTaskDefinition: Update an existing Task Definition * * @param scope The scope that identifies a Task Definition (required) * @param code The code that identifies a Task Definition (required) * @param updateTaskDefinitionRequest The data to update a Task Definition (required) * @return APIupdateTaskDefinitionRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Task Definition not found. -
0 Error response -
*/ public APIupdateTaskDefinitionRequest updateTaskDefinition(String scope, String code, UpdateTaskDefinitionRequest updateTaskDefinitionRequest) { return new APIupdateTaskDefinitionRequest(scope, code, updateTaskDefinitionRequest); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy