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

com.finbourne.scheduler.api.SchedulesApi Maven / Gradle / Ivy

There is a newer version: 0.0.944
Show newest version
/*
 * FINBOURNE Scheduler API
 * ### Introduction   # Error Codes   | Code|Name|Description | | ---|---|--- | | -1|Unknown error|An unexpected error was encountered on our side. | | 144|Duplicate In Parameter Set|  | | 151|Invalid Parameter Value|  | | 152|Action Execution Failure|  | | 157|Invalid Request|  | | 186|Access Denied|  | | 187|Invalid Identity Token|  | | 689|The supplied pagination token is invalid|  | | 692|This endpoint does not support impersonation|  | | 704|Cannot Delete Job|  | | 731|Unable to process images associated with request.|  | | 756|Image Scan Failure|  | | 871|The specified impersonated user does not exist|  | 
 *
 * The version of the OpenAPI document: 0.0.936
 * 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.scheduler.api;

import com.finbourne.scheduler.ApiCallback;
import com.finbourne.scheduler.ApiClient;
import com.finbourne.scheduler.ApiException;
import com.finbourne.scheduler.ApiResponse;
import com.finbourne.scheduler.Configuration;
import com.finbourne.scheduler.Pair;
import com.finbourne.scheduler.ProgressRequestBody;
import com.finbourne.scheduler.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.finbourne.scheduler.model.CreateScheduleRequest;
import com.finbourne.scheduler.model.LusidProblemDetails;
import com.finbourne.scheduler.model.LusidValidationProblemDetails;
import com.finbourne.scheduler.model.ResourceListOfScheduleDefinition;
import com.finbourne.scheduler.model.ScheduleDefinition;
import com.finbourne.scheduler.model.StartScheduleResponse;
import com.finbourne.scheduler.model.UpdateScheduleRequest;

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

public class SchedulesApi {
    private ApiClient localVarApiClient;
    public SchedulesApi() {
        this(Configuration.getDefaultApiClient());
    }

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for createSchedule
     * @param createScheduleRequest  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
201 The newly created schedule -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call createScheduleCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createScheduleRequest; // create path and map variables String localVarPath = "/api/schedules"; 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 = { "application/json-patch+json", "application/json", "text/json", "application/_*+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("X-LUSID-SDK-Language", "Java"); localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.936"); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createScheduleValidateBeforeCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createScheduleRequest' is set if (createScheduleRequest == null) { throw new ApiException("Missing the required parameter 'createScheduleRequest' when calling createSchedule(Async)"); } okhttp3.Call localVarCall = createScheduleCall(createScheduleRequest, _callback); return localVarCall; } /** * [EXPERIMENTAL] CreateSchedule: Create a Schedule for a job * * @param createScheduleRequest (required) * @return ScheduleDefinition * @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 The newly created schedule -
400 The details of the input related failure -
0 Error response -
*/ public ScheduleDefinition createSchedule(CreateScheduleRequest createScheduleRequest) throws ApiException { ApiResponse localVarResp = createScheduleWithHttpInfo(createScheduleRequest); return localVarResp.getData(); } /** * [EXPERIMENTAL] CreateSchedule: Create a Schedule for a job * * @param createScheduleRequest (required) * @return ApiResponse<ScheduleDefinition> * @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 The newly created schedule -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse createScheduleWithHttpInfo(CreateScheduleRequest createScheduleRequest) throws ApiException { okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * [EXPERIMENTAL] CreateSchedule: Create a Schedule for a job (asynchronously) * * @param createScheduleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
201 The newly created schedule -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call createScheduleAsync(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteSchedule * @param scope Scope of the schedule to be deleted (required) * @param code Code of the schedule to be deleted (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call deleteScheduleCall(String scope, String code, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/schedules/{scope}/{code}" .replaceAll("\\{" + "scope" + "\\}", localVarApiClient.escapeString(scope.toString())) .replaceAll("\\{" + "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 = { "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); localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("X-LUSID-SDK-Language", "Java"); localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.936"); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteScheduleValidateBeforeCall(String scope, String code, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling deleteSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling deleteSchedule(Async)"); } okhttp3.Call localVarCall = deleteScheduleCall(scope, code, _callback); return localVarCall; } /** * [EXPERIMENTAL] DeleteSchedule: Delete a schedule * * @param scope Scope of the schedule to be deleted (required) * @param code Code of the schedule to be deleted (required) * @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
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public void deleteSchedule(String scope, String code) throws ApiException { deleteScheduleWithHttpInfo(scope, code); } /** * [EXPERIMENTAL] DeleteSchedule: Delete a schedule * * @param scope Scope of the schedule to be deleted (required) * @param code Code of the schedule to be deleted (required) * @return ApiResponse<Void> * @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
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse deleteScheduleWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scope, code, null); return localVarApiClient.execute(localVarCall); } /** * [EXPERIMENTAL] DeleteSchedule: Delete a schedule (asynchronously) * * @param scope Scope of the schedule to be deleted (required) * @param code Code of the schedule to be deleted (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call deleteScheduleAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scope, code, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for enabledSchedule * @param scope Scope of the schedule to be enabled/disabled (required) * @param code Code of the schedule to be enabled/disabled (required) * @param enable Specify whether to enable or disable the schedule (required) * @param _callback Callback for upload/download progress * @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 -
0 Error response -
*/ public okhttp3.Call enabledScheduleCall(String scope, String code, Boolean enable, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/schedules/{scope}/{code}/enabled" .replaceAll("\\{" + "scope" + "\\}", localVarApiClient.escapeString(scope.toString())) .replaceAll("\\{" + "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 (enable != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("enable", enable)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("X-LUSID-SDK-Language", "Java"); localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.936"); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call enabledScheduleValidateBeforeCall(String scope, String code, Boolean enable, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling enabledSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling enabledSchedule(Async)"); } // verify the required parameter 'enable' is set if (enable == null) { throw new ApiException("Missing the required parameter 'enable' when calling enabledSchedule(Async)"); } okhttp3.Call localVarCall = enabledScheduleCall(scope, code, enable, _callback); return localVarCall; } /** * [EXPERIMENTAL] EnabledSchedule: Enable/disable a schedule * * @param scope Scope of the schedule to be enabled/disabled (required) * @param code Code of the schedule to be enabled/disabled (required) * @param enable Specify whether to enable or disable the schedule (required) * @return ScheduleDefinition * @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 -
0 Error response -
*/ public ScheduleDefinition enabledSchedule(String scope, String code, Boolean enable) throws ApiException { ApiResponse localVarResp = enabledScheduleWithHttpInfo(scope, code, enable); return localVarResp.getData(); } /** * [EXPERIMENTAL] EnabledSchedule: Enable/disable a schedule * * @param scope Scope of the schedule to be enabled/disabled (required) * @param code Code of the schedule to be enabled/disabled (required) * @param enable Specify whether to enable or disable the schedule (required) * @return ApiResponse<ScheduleDefinition> * @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 -
0 Error response -
*/ public ApiResponse enabledScheduleWithHttpInfo(String scope, String code, Boolean enable) throws ApiException { okhttp3.Call localVarCall = enabledScheduleValidateBeforeCall(scope, code, enable, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * [EXPERIMENTAL] EnabledSchedule: Enable/disable a schedule (asynchronously) * * @param scope Scope of the schedule to be enabled/disabled (required) * @param code Code of the schedule to be enabled/disabled (required) * @param enable Specify whether to enable or disable the schedule (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call enabledScheduleAsync(String scope, String code, Boolean enable, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = enabledScheduleValidateBeforeCall(scope, code, enable, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSchedule * @param scope The scope of Schedule (required) * @param code The code of the Schedule (required) * @param _callback Callback for upload/download progress * @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 -
0 Error response -
*/ public okhttp3.Call getScheduleCall(String scope, String code, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/schedules/{scope}/{code}" .replaceAll("\\{" + "scope" + "\\}", localVarApiClient.escapeString(scope.toString())) .replaceAll("\\{" + "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 = { "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); localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("X-LUSID-SDK-Language", "Java"); localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.936"); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getScheduleValidateBeforeCall(String scope, String code, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling getSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling getSchedule(Async)"); } okhttp3.Call localVarCall = getScheduleCall(scope, code, _callback); return localVarCall; } /** * [EXPERIMENTAL] GetSchedule: Get a single Schedule * * @param scope The scope of Schedule (required) * @param code The code of the Schedule (required) * @return ScheduleDefinition * @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 -
0 Error response -
*/ public ScheduleDefinition getSchedule(String scope, String code) throws ApiException { ApiResponse localVarResp = getScheduleWithHttpInfo(scope, code); return localVarResp.getData(); } /** * [EXPERIMENTAL] GetSchedule: Get a single Schedule * * @param scope The scope of Schedule (required) * @param code The code of the Schedule (required) * @return ApiResponse<ScheduleDefinition> * @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 -
0 Error response -
*/ public ApiResponse getScheduleWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = getScheduleValidateBeforeCall(scope, code, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * [EXPERIMENTAL] GetSchedule: Get a single Schedule (asynchronously) * * @param scope The scope of Schedule (required) * @param code The code of the Schedule (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call getScheduleAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getScheduleValidateBeforeCall(scope, code, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listSchedules * @param page The pagination token to use to continue listing instruments from a previous call to list instruments. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional) * @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. (optional) * @param start When paginating, skip this number of results. (optional) * @param limit When paginating, limit the number of returned results to this many. Defaults to 2000 if not specified. Maximum is 5000. (optional, default to 2000) * @param filter Expression to filter the result set. (optional) * @param _callback Callback for upload/download progress * @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 -
0 Error response -
*/ public okhttp3.Call listSchedulesCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/schedules"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (sortBy != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy)); } if (start != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("X-LUSID-SDK-Language", "Java"); localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.936"); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listSchedulesValidateBeforeCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listSchedulesCall(page, sortBy, start, limit, filter, _callback); return localVarCall; } /** * [EXPERIMENTAL] ListSchedules: List the available Schedules * * @param page The pagination token to use to continue listing instruments from a previous call to list instruments. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional) * @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. (optional) * @param start When paginating, skip this number of results. (optional) * @param limit When paginating, limit the number of returned results to this many. Defaults to 2000 if not specified. Maximum is 5000. (optional, default to 2000) * @param filter Expression to filter the result set. (optional) * @return ResourceListOfScheduleDefinition * @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 -
0 Error response -
*/ public ResourceListOfScheduleDefinition listSchedules(String page, List sortBy, Integer start, Integer limit, String filter) throws ApiException { ApiResponse localVarResp = listSchedulesWithHttpInfo(page, sortBy, start, limit, filter); return localVarResp.getData(); } /** * [EXPERIMENTAL] ListSchedules: List the available Schedules * * @param page The pagination token to use to continue listing instruments from a previous call to list instruments. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional) * @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. (optional) * @param start When paginating, skip this number of results. (optional) * @param limit When paginating, limit the number of returned results to this many. Defaults to 2000 if not specified. Maximum is 5000. (optional, default to 2000) * @param filter Expression to filter the result set. (optional) * @return ApiResponse<ResourceListOfScheduleDefinition> * @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 -
0 Error response -
*/ public ApiResponse listSchedulesWithHttpInfo(String page, List sortBy, Integer start, Integer limit, String filter) throws ApiException { okhttp3.Call localVarCall = listSchedulesValidateBeforeCall(page, sortBy, start, limit, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * [EXPERIMENTAL] ListSchedules: List the available Schedules (asynchronously) * * @param page The pagination token to use to continue listing instruments from a previous call to list instruments. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional) * @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. (optional) * @param start When paginating, skip this number of results. (optional) * @param limit When paginating, limit the number of returned results to this many. Defaults to 2000 if not specified. Maximum is 5000. (optional, default to 2000) * @param filter Expression to filter the result set. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call listSchedulesAsync(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listSchedulesValidateBeforeCall(page, sortBy, start, limit, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for runSchedule * @param scope The schedule scope (required) * @param code The schedule cde (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call runScheduleCall(String scope, String code, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/schedules/{scope}/{code}/$run" .replaceAll("\\{" + "scope" + "\\}", localVarApiClient.escapeString(scope.toString())) .replaceAll("\\{" + "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 = { "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); localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("X-LUSID-SDK-Language", "Java"); localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.936"); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call runScheduleValidateBeforeCall(String scope, String code, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling runSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling runSchedule(Async)"); } okhttp3.Call localVarCall = runScheduleCall(scope, code, _callback); return localVarCall; } /** * [EXPERIMENTAL] RunSchedule: Run a schedule immediately * * @param scope The schedule scope (required) * @param code The schedule cde (required) * @return StartScheduleResponse * @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
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public StartScheduleResponse runSchedule(String scope, String code) throws ApiException { ApiResponse localVarResp = runScheduleWithHttpInfo(scope, code); return localVarResp.getData(); } /** * [EXPERIMENTAL] RunSchedule: Run a schedule immediately * * @param scope The schedule scope (required) * @param code The schedule cde (required) * @return ApiResponse<StartScheduleResponse> * @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
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse runScheduleWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = runScheduleValidateBeforeCall(scope, code, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * [EXPERIMENTAL] RunSchedule: Run a schedule immediately (asynchronously) * * @param scope The schedule scope (required) * @param code The schedule cde (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call runScheduleAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = runScheduleValidateBeforeCall(scope, code, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSchedule * @param scope Scope of the schedule to be updated (required) * @param code Code of the schedule to be updated (required) * @param updateScheduleRequest The updated schedule (required) * @param _callback Callback for upload/download progress * @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 -
0 Error response -
*/ public okhttp3.Call updateScheduleCall(String scope, String code, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = updateScheduleRequest; // create path and map variables String localVarPath = "/api/schedules/{scope}/{code}" .replaceAll("\\{" + "scope" + "\\}", localVarApiClient.escapeString(scope.toString())) .replaceAll("\\{" + "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 = { "text/plain", "application/json", "text/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); localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("X-LUSID-SDK-Language", "Java"); localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.936"); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateScheduleValidateBeforeCall(String scope, String code, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling updateSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling updateSchedule(Async)"); } // verify the required parameter 'updateScheduleRequest' is set if (updateScheduleRequest == null) { throw new ApiException("Missing the required parameter 'updateScheduleRequest' when calling updateSchedule(Async)"); } okhttp3.Call localVarCall = updateScheduleCall(scope, code, updateScheduleRequest, _callback); return localVarCall; } /** * [EXPERIMENTAL] UpdateSchedule: Update a schedule. * * @param scope Scope of the schedule to be updated (required) * @param code Code of the schedule to be updated (required) * @param updateScheduleRequest The updated schedule (required) * @return ScheduleDefinition * @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 -
0 Error response -
*/ public ScheduleDefinition updateSchedule(String scope, String code, UpdateScheduleRequest updateScheduleRequest) throws ApiException { ApiResponse localVarResp = updateScheduleWithHttpInfo(scope, code, updateScheduleRequest); return localVarResp.getData(); } /** * [EXPERIMENTAL] UpdateSchedule: Update a schedule. * * @param scope Scope of the schedule to be updated (required) * @param code Code of the schedule to be updated (required) * @param updateScheduleRequest The updated schedule (required) * @return ApiResponse<ScheduleDefinition> * @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 -
0 Error response -
*/ public ApiResponse updateScheduleWithHttpInfo(String scope, String code, UpdateScheduleRequest updateScheduleRequest) throws ApiException { okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scope, code, updateScheduleRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * [EXPERIMENTAL] UpdateSchedule: Update a schedule. (asynchronously) * * @param scope Scope of the schedule to be updated (required) * @param code Code of the schedule to be updated (required) * @param updateScheduleRequest The updated schedule (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call updateScheduleAsync(String scope, String code, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scope, code, updateScheduleRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy