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

com.finbourne.workflow.api.ActionLogsApi 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.ActionLog;
import com.finbourne.workflow.model.LusidProblemDetails;
import com.finbourne.workflow.model.LusidValidationProblemDetails;

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

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

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

    public ActionLogsApi(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 getActionLogsCall(String id, final ApiCallback _callback) throws ApiException {
        return getActionLogsCall(id,  _callback, new ConfigurationOptions());
    }

    private okhttp3.Call getActionLogsCall(String id, 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/actionlogs/{id}"
            .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));

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

        final String[] localVarAccepts = {
            "text/plain",
            "application/json",
            "text/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 getActionLogsValidateBeforeCall(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
        // verify the required parameter 'id' is set
        if (id == null) {
            throw new ApiException("Missing the required parameter 'id' when calling getActionLogs(Async)");
        }

        return getActionLogsCall(id, _callback, opts);

    }


    private ApiResponse getActionLogsWithHttpInfo(String id) throws ApiException {
        okhttp3.Call localVarCall = getActionLogsValidateBeforeCall(id, null, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private ApiResponse getActionLogsWithHttpInfo(String id, ConfigurationOptions opts) throws ApiException {
        okhttp3.Call localVarCall = getActionLogsValidateBeforeCall(id, null, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getActionLogsAsync(String id, final ApiCallback _callback) throws ApiException {

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

    private okhttp3.Call getActionLogsAsync(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {

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

    public class APIgetActionLogsRequest {
        private final String id;

        private APIgetActionLogsRequest(String id) {
            this.id = id;
        }

        /**
         * Build call for getActionLogs
         * @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 Action Log not found. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getActionLogsCall(id, _callback); } /** * Execute getActionLogs request * @return ActionLog * @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 Action Log not found. -
0 Error response -
*/ public ActionLog execute() throws ApiException { ApiResponse localVarResp = getActionLogsWithHttpInfo(id); return localVarResp.getData(); } /** * Execute getActionLogs request. Use any specified configuration options to override any other configuration for this request only. * @return ActionLog * @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 Action Log not found. -
0 Error response -
*/ public ActionLog execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = getActionLogsWithHttpInfo(id, opts); return localVarResp.getData(); } /** * Execute getActionLogs request with HTTP info returned * @return ApiResponse<ActionLog> * @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 Action Log not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getActionLogsWithHttpInfo(id); } /** * Execute getActionLogs request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<ActionLog> * @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 Action Log not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return getActionLogsWithHttpInfo(id, opts); } /** * Execute getActionLogs 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 Action Log not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getActionLogsAsync(id, _callback); } /** * Execute getActionLogs 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 Action Log not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return getActionLogsAsync(id, _callback, opts); } } /** * [EXPERIMENTAL] GetActionLogs: Get the Action Logs for an Action Id * * @param id The Action Id (required) * @return APIgetActionLogsRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Action Log not found. -
0 Error response -
*/ public APIgetActionLogsRequest getActionLogs(String id) { return new APIgetActionLogsRequest(id); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy