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

com.finbourne.workflow.api.EventHandlersApi 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.CreateEventHandlerRequest;
import com.finbourne.workflow.model.DeletedEntityResponse;
import com.finbourne.workflow.model.EventHandler;
import com.finbourne.workflow.model.LusidProblemDetails;
import com.finbourne.workflow.model.LusidValidationProblemDetails;
import java.time.OffsetDateTime;
import com.finbourne.workflow.model.PagedResourceListOfEventHandler;
import com.finbourne.workflow.model.UpdateEventHandlerRequest;

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

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

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

    public EventHandlersApi(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 createEventHandlerCall(CreateEventHandlerRequest createEventHandlerRequest, final ApiCallback _callback) throws ApiException {
        return createEventHandlerCall(createEventHandlerRequest,  _callback, new ConfigurationOptions());
    }

    private okhttp3.Call createEventHandlerCall(CreateEventHandlerRequest createEventHandlerRequest, 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 = createEventHandlerRequest;

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

        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 createEventHandlerValidateBeforeCall(CreateEventHandlerRequest createEventHandlerRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
        // verify the required parameter 'createEventHandlerRequest' is set
        if (createEventHandlerRequest == null) {
            throw new ApiException("Missing the required parameter 'createEventHandlerRequest' when calling createEventHandler(Async)");
        }

        return createEventHandlerCall(createEventHandlerRequest, _callback, opts);

    }


    private ApiResponse createEventHandlerWithHttpInfo(CreateEventHandlerRequest createEventHandlerRequest) throws ApiException {
        okhttp3.Call localVarCall = createEventHandlerValidateBeforeCall(createEventHandlerRequest, null, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private ApiResponse createEventHandlerWithHttpInfo(CreateEventHandlerRequest createEventHandlerRequest, ConfigurationOptions opts) throws ApiException {
        okhttp3.Call localVarCall = createEventHandlerValidateBeforeCall(createEventHandlerRequest, null, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call createEventHandlerAsync(CreateEventHandlerRequest createEventHandlerRequest, final ApiCallback _callback) throws ApiException {

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

    private okhttp3.Call createEventHandlerAsync(CreateEventHandlerRequest createEventHandlerRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {

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

    public class APIcreateEventHandlerRequest {
        private final CreateEventHandlerRequest createEventHandlerRequest;

        private APIcreateEventHandlerRequest(CreateEventHandlerRequest createEventHandlerRequest) {
            this.createEventHandlerRequest = createEventHandlerRequest;
        }

        /**
         * Build call for createEventHandler
         * @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 createEventHandlerCall(createEventHandlerRequest, _callback); } /** * Execute createEventHandler request * @return EventHandler * @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 EventHandler execute() throws ApiException { ApiResponse localVarResp = createEventHandlerWithHttpInfo(createEventHandlerRequest); return localVarResp.getData(); } /** * Execute createEventHandler request. Use any specified configuration options to override any other configuration for this request only. * @return EventHandler * @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 EventHandler execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = createEventHandlerWithHttpInfo(createEventHandlerRequest, opts); return localVarResp.getData(); } /** * Execute createEventHandler request with HTTP info returned * @return ApiResponse<EventHandler> * @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 createEventHandlerWithHttpInfo(createEventHandlerRequest); } /** * Execute createEventHandler request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<EventHandler> * @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 createEventHandlerWithHttpInfo(createEventHandlerRequest, opts); } /** * Execute createEventHandler 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 createEventHandlerAsync(createEventHandlerRequest, _callback); } /** * Execute createEventHandler 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 createEventHandlerAsync(createEventHandlerRequest, _callback, opts); } } /** * [EXPERIMENTAL] CreateEventHandler: Create a new Event Handler * * @param createEventHandlerRequest The data to create an Event Handler (required) * @return APIcreateEventHandlerRequest * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public APIcreateEventHandlerRequest createEventHandler(CreateEventHandlerRequest createEventHandlerRequest) { return new APIcreateEventHandlerRequest(createEventHandlerRequest); } private okhttp3.Call deleteEventHandlerCall(String scope, String code, final ApiCallback _callback) throws ApiException { return deleteEventHandlerCall(scope, code, _callback, new ConfigurationOptions()); } private okhttp3.Call deleteEventHandlerCall(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/eventhandlers/{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 deleteEventHandlerValidateBeforeCall(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 deleteEventHandler(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling deleteEventHandler(Async)"); } return deleteEventHandlerCall(scope, code, _callback, opts); } private ApiResponse deleteEventHandlerWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = deleteEventHandlerValidateBeforeCall(scope, code, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse deleteEventHandlerWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deleteEventHandlerValidateBeforeCall(scope, code, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteEventHandlerAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteEventHandlerValidateBeforeCall(scope, code, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call deleteEventHandlerAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deleteEventHandlerValidateBeforeCall(scope, code, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteEventHandlerRequest { private final String scope; private final String code; private APIdeleteEventHandlerRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Build call for deleteEventHandler * @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 Event Handler not found. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteEventHandlerCall(scope, code, _callback); } /** * Execute deleteEventHandler 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 Event Handler not found. -
0 Error response -
*/ public DeletedEntityResponse execute() throws ApiException { ApiResponse localVarResp = deleteEventHandlerWithHttpInfo(scope, code); return localVarResp.getData(); } /** * Execute deleteEventHandler 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 Event Handler not found. -
0 Error response -
*/ public DeletedEntityResponse execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = deleteEventHandlerWithHttpInfo(scope, code, opts); return localVarResp.getData(); } /** * Execute deleteEventHandler 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 Event Handler not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteEventHandlerWithHttpInfo(scope, code); } /** * Execute deleteEventHandler 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 Event Handler not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return deleteEventHandlerWithHttpInfo(scope, code, opts); } /** * Execute deleteEventHandler 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 Event Handler not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteEventHandlerAsync(scope, code, _callback); } /** * Execute deleteEventHandler 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 Event Handler not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return deleteEventHandlerAsync(scope, code, _callback, opts); } } /** * [EXPERIMENTAL] DeleteEventHandler: Delete an Event Handler * If the Event Handler does not exist a failure will be returned * @param scope Scope of the event handler to be deleted (required) * @param code Code of the event handler to be deleted (required) * @return APIdeleteEventHandlerRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Event Handler not found. -
0 Error response -
*/ public APIdeleteEventHandlerRequest deleteEventHandler(String scope, String code) { return new APIdeleteEventHandlerRequest(scope, code); } private okhttp3.Call getEventHandlerCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { return getEventHandlerCall(scope, code, asAt, _callback, new ConfigurationOptions()); } private okhttp3.Call getEventHandlerCall(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/eventhandlers/{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 getEventHandlerValidateBeforeCall(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 getEventHandler(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling getEventHandler(Async)"); } return getEventHandlerCall(scope, code, asAt, _callback, opts); } private ApiResponse getEventHandlerWithHttpInfo(String scope, String code, OffsetDateTime asAt) throws ApiException { okhttp3.Call localVarCall = getEventHandlerValidateBeforeCall(scope, code, asAt, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse getEventHandlerWithHttpInfo(String scope, String code, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getEventHandlerValidateBeforeCall(scope, code, asAt, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getEventHandlerAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEventHandlerValidateBeforeCall(scope, code, asAt, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call getEventHandlerAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getEventHandlerValidateBeforeCall(scope, code, asAt, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetEventHandlerRequest { private final String scope; private final String code; private OffsetDateTime asAt; private APIgetEventHandlerRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Set asAt * @param asAt The asAt datetime at which to retrieve the event handler. Defaults to returning the latest version of the event handler if not specified. (optional) * @return APIgetEventHandlerRequest */ public APIgetEventHandlerRequest asAt(OffsetDateTime asAt) { this.asAt = asAt; return this; } /** * Build call for getEventHandler * @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 getEventHandlerCall(scope, code, asAt, _callback); } /** * Execute getEventHandler request * @return EventHandler * @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 EventHandler execute() throws ApiException { ApiResponse localVarResp = getEventHandlerWithHttpInfo(scope, code, asAt); return localVarResp.getData(); } /** * Execute getEventHandler request. Use any specified configuration options to override any other configuration for this request only. * @return EventHandler * @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 EventHandler execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = getEventHandlerWithHttpInfo(scope, code, asAt, opts); return localVarResp.getData(); } /** * Execute getEventHandler request with HTTP info returned * @return ApiResponse<EventHandler> * @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 getEventHandlerWithHttpInfo(scope, code, asAt); } /** * Execute getEventHandler request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<EventHandler> * @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 getEventHandlerWithHttpInfo(scope, code, asAt, opts); } /** * Execute getEventHandler 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 getEventHandlerAsync(scope, code, asAt, _callback); } /** * Execute getEventHandler 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 getEventHandlerAsync(scope, code, asAt, _callback, opts); } } /** * [EXPERIMENTAL] GetEventHandler: Get an Event Handler * Will return a NotFound failure if the event handler does not exist * @param scope Scope of the event handler (required) * @param code Code of the event handler (required) * @return APIgetEventHandlerRequest * @http.response.details
Status Code Description Response Headers
201 Created -
400 The details of the input related failure -
0 Error response -
*/ public APIgetEventHandlerRequest getEventHandler(String scope, String code) { return new APIgetEventHandlerRequest(scope, code); } private okhttp3.Call listEventHandlersCall(OffsetDateTime asAt, String filter, Integer limit, String page, final ApiCallback _callback) throws ApiException { return listEventHandlersCall(asAt, filter, limit, page, _callback, new ConfigurationOptions()); } private okhttp3.Call listEventHandlersCall(OffsetDateTime asAt, String filter, 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/eventhandlers"; 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 (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 listEventHandlersValidateBeforeCall(OffsetDateTime asAt, String filter, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listEventHandlersCall(asAt, filter, limit, page, _callback, opts); } private ApiResponse listEventHandlersWithHttpInfo(OffsetDateTime asAt, String filter, Integer limit, String page) throws ApiException { okhttp3.Call localVarCall = listEventHandlersValidateBeforeCall(asAt, filter, limit, page, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse listEventHandlersWithHttpInfo(OffsetDateTime asAt, String filter, Integer limit, String page, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listEventHandlersValidateBeforeCall(asAt, filter, limit, page, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listEventHandlersAsync(OffsetDateTime asAt, String filter, Integer limit, String page, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listEventHandlersValidateBeforeCall(asAt, filter, limit, page, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call listEventHandlersAsync(OffsetDateTime asAt, String filter, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listEventHandlersValidateBeforeCall(asAt, filter, limit, page, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistEventHandlersRequest { private OffsetDateTime asAt; private String filter; private Integer limit; private String page; private APIlistEventHandlersRequest() { } /** * Set asAt * @param asAt The asAt datetime at which to list the Event Handlers. Defaults to return the latest version of each Event Handler if not specified. (optional) * @return APIlistEventHandlersRequest */ public APIlistEventHandlersRequest 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 APIlistEventHandlersRequest */ public APIlistEventHandlersRequest filter(String filter) { this.filter = filter; return this; } /** * Set limit * @param limit When paginating, limit the number of returned results to this many. (optional, default to 10) * @return APIlistEventHandlersRequest */ public APIlistEventHandlersRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set page * @param page The pagination token to use to continue listing event handlers from a previous call to list event handlers. 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 APIlistEventHandlersRequest */ public APIlistEventHandlersRequest page(String page) { this.page = page; return this; } /** * Build call for listEventHandlers * @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 Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listEventHandlersCall(asAt, filter, limit, page, _callback); } /** * Execute listEventHandlers request * @return PagedResourceListOfEventHandler * @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 Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public PagedResourceListOfEventHandler execute() throws ApiException { ApiResponse localVarResp = listEventHandlersWithHttpInfo(asAt, filter, limit, page); return localVarResp.getData(); } /** * Execute listEventHandlers request. Use any specified configuration options to override any other configuration for this request only. * @return PagedResourceListOfEventHandler * @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 Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public PagedResourceListOfEventHandler execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = listEventHandlersWithHttpInfo(asAt, filter, limit, page, opts); return localVarResp.getData(); } /** * Execute listEventHandlers request with HTTP info returned * @return ApiResponse<PagedResourceListOfEventHandler> * @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 Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listEventHandlersWithHttpInfo(asAt, filter, limit, page); } /** * Execute listEventHandlers request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<PagedResourceListOfEventHandler> * @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 Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return listEventHandlersWithHttpInfo(asAt, filter, limit, page, opts); } /** * Execute listEventHandlers 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 Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listEventHandlersAsync(asAt, filter, limit, page, _callback); } /** * Execute listEventHandlers 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 Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listEventHandlersAsync(asAt, filter, limit, page, _callback, opts); } } /** * [EXPERIMENTAL] ListEventHandlers: List Event Handlers * * @return APIlistEventHandlersRequest * @http.response.details
Status Code Description Response Headers
200 List of Event Handlers -
400 The details of the input related failure -
0 Error response -
*/ public APIlistEventHandlersRequest listEventHandlers() { return new APIlistEventHandlersRequest(); } private okhttp3.Call updateEventHandlerCall(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest, final ApiCallback _callback) throws ApiException { return updateEventHandlerCall(scope, code, updateEventHandlerRequest, _callback, new ConfigurationOptions()); } private okhttp3.Call updateEventHandlerCall(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest, 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 = updateEventHandlerRequest; // create path and map variables String localVarPath = "/api/eventhandlers/{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 updateEventHandlerValidateBeforeCall(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest, 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 updateEventHandler(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling updateEventHandler(Async)"); } // verify the required parameter 'updateEventHandlerRequest' is set if (updateEventHandlerRequest == null) { throw new ApiException("Missing the required parameter 'updateEventHandlerRequest' when calling updateEventHandler(Async)"); } return updateEventHandlerCall(scope, code, updateEventHandlerRequest, _callback, opts); } private ApiResponse updateEventHandlerWithHttpInfo(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest) throws ApiException { okhttp3.Call localVarCall = updateEventHandlerValidateBeforeCall(scope, code, updateEventHandlerRequest, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse updateEventHandlerWithHttpInfo(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updateEventHandlerValidateBeforeCall(scope, code, updateEventHandlerRequest, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updateEventHandlerAsync(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateEventHandlerValidateBeforeCall(scope, code, updateEventHandlerRequest, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call updateEventHandlerAsync(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updateEventHandlerValidateBeforeCall(scope, code, updateEventHandlerRequest, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIupdateEventHandlerRequest { private final String scope; private final String code; private final UpdateEventHandlerRequest updateEventHandlerRequest; private APIupdateEventHandlerRequest(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest) { this.scope = scope; this.code = code; this.updateEventHandlerRequest = updateEventHandlerRequest; } /** * Build call for updateEventHandler * @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 Event Handler not found. -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updateEventHandlerCall(scope, code, updateEventHandlerRequest, _callback); } /** * Execute updateEventHandler request * @return EventHandler * @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 Event Handler not found. -
0 Error response -
*/ public EventHandler execute() throws ApiException { ApiResponse localVarResp = updateEventHandlerWithHttpInfo(scope, code, updateEventHandlerRequest); return localVarResp.getData(); } /** * Execute updateEventHandler request. Use any specified configuration options to override any other configuration for this request only. * @return EventHandler * @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 Event Handler not found. -
0 Error response -
*/ public EventHandler execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = updateEventHandlerWithHttpInfo(scope, code, updateEventHandlerRequest, opts); return localVarResp.getData(); } /** * Execute updateEventHandler request with HTTP info returned * @return ApiResponse<EventHandler> * @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 Event Handler not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return updateEventHandlerWithHttpInfo(scope, code, updateEventHandlerRequest); } /** * Execute updateEventHandler request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<EventHandler> * @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 Event Handler not found. -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return updateEventHandlerWithHttpInfo(scope, code, updateEventHandlerRequest, opts); } /** * Execute updateEventHandler 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 Event Handler not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updateEventHandlerAsync(scope, code, updateEventHandlerRequest, _callback); } /** * Execute updateEventHandler 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 Event Handler not found. -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return updateEventHandlerAsync(scope, code, updateEventHandlerRequest, _callback, opts); } } /** * [EXPERIMENTAL] UpdateEventHandler: Update an existing Event handler * * @param scope The scope that identifies an Event Handler (required) * @param code The code that identifies an Event Handler (required) * @param updateEventHandlerRequest The data to update an Event Handler (required) * @return APIupdateEventHandlerRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 Event Handler not found. -
0 Error response -
*/ public APIupdateEventHandlerRequest updateEventHandler(String scope, String code, UpdateEventHandlerRequest updateEventHandlerRequest) { return new APIupdateEventHandlerRequest(scope, code, updateEventHandlerRequest); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy