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: 2.0.85
Show newest version
/*
 * FINBOURNE Scheduler 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.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.finbourne.scheduler.extensions.ConfigurationOptions;

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;
    private int localHostIndex;
    private String localCustomBaseUrl;

    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;
    }

    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 createScheduleCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException {
        return createScheduleCall(createScheduleRequest,  _callback, new ConfigurationOptions());
    }

    private okhttp3.Call createScheduleCall(CreateScheduleRequest createScheduleRequest, 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 = 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);
        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 createScheduleValidateBeforeCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
        // verify the required parameter 'createScheduleRequest' is set
        if (createScheduleRequest == null) {
            throw new ApiException("Missing the required parameter 'createScheduleRequest' when calling createSchedule(Async)");
        }

        return createScheduleCall(createScheduleRequest, _callback, opts);

    }


    private ApiResponse createScheduleWithHttpInfo(CreateScheduleRequest createScheduleRequest) throws ApiException {
        okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, null, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private ApiResponse createScheduleWithHttpInfo(CreateScheduleRequest createScheduleRequest, ConfigurationOptions opts) throws ApiException {
        okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, null, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call createScheduleAsync(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException {

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

    private okhttp3.Call createScheduleAsync(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {

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

    public class APIcreateScheduleRequest {
        private final CreateScheduleRequest createScheduleRequest;

        private APIcreateScheduleRequest(CreateScheduleRequest createScheduleRequest) {
            this.createScheduleRequest = createScheduleRequest;
        }

        /**
         * Build call for createSchedule
         * @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 The newly created schedule -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createScheduleCall(createScheduleRequest, _callback); } /** * Execute createSchedule request * @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 execute() throws ApiException { ApiResponse localVarResp = createScheduleWithHttpInfo(createScheduleRequest); return localVarResp.getData(); } /** * Execute createSchedule request. Use any specified configuration options to override any other configuration for this request only. * @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 execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = createScheduleWithHttpInfo(createScheduleRequest, opts); return localVarResp.getData(); } /** * Execute createSchedule request with HTTP info returned * @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 executeWithHttpInfo() throws ApiException { return createScheduleWithHttpInfo(createScheduleRequest); } /** * Execute createSchedule request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return createScheduleWithHttpInfo(createScheduleRequest, opts); } /** * Execute createSchedule 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 The newly created schedule -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createScheduleAsync(createScheduleRequest, _callback); } /** * Execute createSchedule 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 The newly created schedule -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return createScheduleAsync(createScheduleRequest, _callback, opts); } } /** * [EXPERIMENTAL] CreateSchedule: Create a Schedule for a job * * @param createScheduleRequest (required) * @return APIcreateScheduleRequest * @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 APIcreateScheduleRequest createSchedule(CreateScheduleRequest createScheduleRequest) { return new APIcreateScheduleRequest(createScheduleRequest); } private okhttp3.Call deleteScheduleCall(String scope, String code, final ApiCallback _callback) throws ApiException { return deleteScheduleCall(scope, code, _callback, new ConfigurationOptions()); } private okhttp3.Call deleteScheduleCall(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/schedules/{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 = { "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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteScheduleValidateBeforeCall(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 deleteSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling deleteSchedule(Async)"); } return deleteScheduleCall(scope, code, _callback, opts); } private ApiResponse deleteScheduleWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scope, code, null, new ConfigurationOptions()); return localVarApiClient.execute(localVarCall); } private ApiResponse deleteScheduleWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scope, code, null, opts); return localVarApiClient.execute(localVarCall); } private okhttp3.Call deleteScheduleAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scope, code, _callback, new ConfigurationOptions()); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } private okhttp3.Call deleteScheduleAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scope, code, _callback, opts); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public class APIdeleteScheduleRequest { private final String scope; private final String code; private APIdeleteScheduleRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Build call for deleteSchedule * @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
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteScheduleCall(scope, code, _callback); } /** * Execute deleteSchedule request * @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 execute() throws ApiException { deleteScheduleWithHttpInfo(scope, code); } /** * Execute deleteSchedule request * @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 execute(ConfigurationOptions opts) throws ApiException { deleteScheduleWithHttpInfo(scope, code, opts); } /** * Execute deleteSchedule request with HTTP info returned * @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 executeWithHttpInfo() throws ApiException { return deleteScheduleWithHttpInfo(scope, code); } /** * Execute deleteSchedule request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return deleteScheduleWithHttpInfo(scope, code, opts); } /** * Execute deleteSchedule 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
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteScheduleAsync(scope, code, _callback); } /** * Execute deleteSchedule 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
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return deleteScheduleAsync(scope, code, _callback, opts); } } /** * [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 APIdeleteScheduleRequest * @http.response.details
Status Code Description Response Headers
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public APIdeleteScheduleRequest deleteSchedule(String scope, String code) { return new APIdeleteScheduleRequest(scope, code); } private okhttp3.Call enabledScheduleCall(String scope, String code, Boolean enable, final ApiCallback _callback) throws ApiException { return enabledScheduleCall(scope, code, enable, _callback, new ConfigurationOptions()); } private okhttp3.Call enabledScheduleCall(String scope, String code, Boolean enable, 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/schedules/{scope}/{code}/enabled" .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 (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); 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 enabledScheduleValidateBeforeCall(String scope, String code, Boolean enable, 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 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)"); } return enabledScheduleCall(scope, code, enable, _callback, opts); } private ApiResponse enabledScheduleWithHttpInfo(String scope, String code, Boolean enable) throws ApiException { okhttp3.Call localVarCall = enabledScheduleValidateBeforeCall(scope, code, enable, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse enabledScheduleWithHttpInfo(String scope, String code, Boolean enable, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = enabledScheduleValidateBeforeCall(scope, code, enable, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call enabledScheduleAsync(String scope, String code, Boolean enable, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = enabledScheduleValidateBeforeCall(scope, code, enable, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call enabledScheduleAsync(String scope, String code, Boolean enable, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = enabledScheduleValidateBeforeCall(scope, code, enable, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIenabledScheduleRequest { private final String scope; private final String code; private final Boolean enable; private APIenabledScheduleRequest(String scope, String code, Boolean enable) { this.scope = scope; this.code = code; this.enable = enable; } /** * Build call for enabledSchedule * @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 -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return enabledScheduleCall(scope, code, enable, _callback); } /** * Execute enabledSchedule request * @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 execute() throws ApiException { ApiResponse localVarResp = enabledScheduleWithHttpInfo(scope, code, enable); return localVarResp.getData(); } /** * Execute enabledSchedule request. Use any specified configuration options to override any other configuration for this request only. * @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 execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = enabledScheduleWithHttpInfo(scope, code, enable, opts); return localVarResp.getData(); } /** * Execute enabledSchedule request with HTTP info returned * @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 executeWithHttpInfo() throws ApiException { return enabledScheduleWithHttpInfo(scope, code, enable); } /** * Execute enabledSchedule request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return enabledScheduleWithHttpInfo(scope, code, enable, opts); } /** * Execute enabledSchedule 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return enabledScheduleAsync(scope, code, enable, _callback); } /** * Execute enabledSchedule 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return enabledScheduleAsync(scope, code, enable, _callback, opts); } } /** * [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 APIenabledScheduleRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIenabledScheduleRequest enabledSchedule(String scope, String code, Boolean enable) { return new APIenabledScheduleRequest(scope, code, enable); } private okhttp3.Call getScheduleCall(String scope, String code, final ApiCallback _callback) throws ApiException { return getScheduleCall(scope, code, _callback, new ConfigurationOptions()); } private okhttp3.Call getScheduleCall(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/schedules/{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 = { "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 getScheduleValidateBeforeCall(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 getSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling getSchedule(Async)"); } return getScheduleCall(scope, code, _callback, opts); } private ApiResponse getScheduleWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = getScheduleValidateBeforeCall(scope, code, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse getScheduleWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getScheduleValidateBeforeCall(scope, code, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getScheduleAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getScheduleValidateBeforeCall(scope, code, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call getScheduleAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getScheduleValidateBeforeCall(scope, code, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetScheduleRequest { private final String scope; private final String code; private APIgetScheduleRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Build call for getSchedule * @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 -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getScheduleCall(scope, code, _callback); } /** * Execute getSchedule request * @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 execute() throws ApiException { ApiResponse localVarResp = getScheduleWithHttpInfo(scope, code); return localVarResp.getData(); } /** * Execute getSchedule request. Use any specified configuration options to override any other configuration for this request only. * @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 execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = getScheduleWithHttpInfo(scope, code, opts); return localVarResp.getData(); } /** * Execute getSchedule request with HTTP info returned * @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 executeWithHttpInfo() throws ApiException { return getScheduleWithHttpInfo(scope, code); } /** * Execute getSchedule request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return getScheduleWithHttpInfo(scope, code, opts); } /** * Execute getSchedule 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getScheduleAsync(scope, code, _callback); } /** * Execute getSchedule 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return getScheduleAsync(scope, code, _callback, opts); } } /** * [EXPERIMENTAL] GetSchedule: Get a single Schedule * * @param scope The scope of Schedule (required) * @param code The code of the Schedule (required) * @return APIgetScheduleRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIgetScheduleRequest getSchedule(String scope, String code) { return new APIgetScheduleRequest(scope, code); } private okhttp3.Call listSchedulesCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { return listSchedulesCall(page, sortBy, start, limit, filter, _callback, new ConfigurationOptions()); } private okhttp3.Call listSchedulesCall(String page, List sortBy, Integer start, Integer limit, String filter, 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/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); 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 listSchedulesValidateBeforeCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listSchedulesCall(page, sortBy, start, limit, filter, _callback, opts); } private ApiResponse listSchedulesWithHttpInfo(String page, List sortBy, Integer start, Integer limit, String filter) throws ApiException { okhttp3.Call localVarCall = listSchedulesValidateBeforeCall(page, sortBy, start, limit, filter, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse listSchedulesWithHttpInfo(String page, List sortBy, Integer start, Integer limit, String filter, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listSchedulesValidateBeforeCall(page, sortBy, start, limit, filter, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private 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, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call listSchedulesAsync(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listSchedulesValidateBeforeCall(page, sortBy, start, limit, filter, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistSchedulesRequest { private String page; private List sortBy; private Integer start; private Integer limit; private String filter; private APIlistSchedulesRequest() { } /** * Set page * @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) * @return APIlistSchedulesRequest */ public APIlistSchedulesRequest page(String page) { this.page = page; return this; } /** * Set sortBy * @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. (optional) * @return APIlistSchedulesRequest */ public APIlistSchedulesRequest sortBy(List sortBy) { this.sortBy = sortBy; return this; } /** * Set start * @param start When paginating, skip this number of results. (optional) * @return APIlistSchedulesRequest */ public APIlistSchedulesRequest start(Integer start) { this.start = start; return this; } /** * Set limit * @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) * @return APIlistSchedulesRequest */ public APIlistSchedulesRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set filter * @param filter Expression to filter the result set. (optional) * @return APIlistSchedulesRequest */ public APIlistSchedulesRequest filter(String filter) { this.filter = filter; return this; } /** * Build call for listSchedules * @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 -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listSchedulesCall(page, sortBy, start, limit, filter, _callback); } /** * Execute listSchedules request * @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 execute() throws ApiException { ApiResponse localVarResp = listSchedulesWithHttpInfo(page, sortBy, start, limit, filter); return localVarResp.getData(); } /** * Execute listSchedules request. Use any specified configuration options to override any other configuration for this request only. * @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 execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = listSchedulesWithHttpInfo(page, sortBy, start, limit, filter, opts); return localVarResp.getData(); } /** * Execute listSchedules request with HTTP info returned * @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 executeWithHttpInfo() throws ApiException { return listSchedulesWithHttpInfo(page, sortBy, start, limit, filter); } /** * Execute listSchedules request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return listSchedulesWithHttpInfo(page, sortBy, start, limit, filter, opts); } /** * Execute listSchedules 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listSchedulesAsync(page, sortBy, start, limit, filter, _callback); } /** * Execute listSchedules 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listSchedulesAsync(page, sortBy, start, limit, filter, _callback, opts); } } /** * [EXPERIMENTAL] ListSchedules: List the available Schedules * * @return APIlistSchedulesRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIlistSchedulesRequest listSchedules() { return new APIlistSchedulesRequest(); } private okhttp3.Call runScheduleCall(String scope, String code, final ApiCallback _callback) throws ApiException { return runScheduleCall(scope, code, _callback, new ConfigurationOptions()); } private okhttp3.Call runScheduleCall(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/schedules/{scope}/{code}/$run" .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 = { "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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call runScheduleValidateBeforeCall(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 runSchedule(Async)"); } // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling runSchedule(Async)"); } return runScheduleCall(scope, code, _callback, opts); } private ApiResponse runScheduleWithHttpInfo(String scope, String code) throws ApiException { okhttp3.Call localVarCall = runScheduleValidateBeforeCall(scope, code, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse runScheduleWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = runScheduleValidateBeforeCall(scope, code, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call runScheduleAsync(String scope, String code, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = runScheduleValidateBeforeCall(scope, code, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call runScheduleAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = runScheduleValidateBeforeCall(scope, code, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIrunScheduleRequest { private final String scope; private final String code; private APIrunScheduleRequest(String scope, String code) { this.scope = scope; this.code = code; } /** * Build call for runSchedule * @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
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return runScheduleCall(scope, code, _callback); } /** * Execute runSchedule request * @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 execute() throws ApiException { ApiResponse localVarResp = runScheduleWithHttpInfo(scope, code); return localVarResp.getData(); } /** * Execute runSchedule request. Use any specified configuration options to override any other configuration for this request only. * @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 execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = runScheduleWithHttpInfo(scope, code, opts); return localVarResp.getData(); } /** * Execute runSchedule request with HTTP info returned * @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 executeWithHttpInfo() throws ApiException { return runScheduleWithHttpInfo(scope, code); } /** * Execute runSchedule request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return runScheduleWithHttpInfo(scope, code, opts); } /** * Execute runSchedule 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
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return runScheduleAsync(scope, code, _callback); } /** * Execute runSchedule 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
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return runScheduleAsync(scope, code, _callback, opts); } } /** * [EXPERIMENTAL] RunSchedule: Run a schedule immediately * * @param scope The schedule scope (required) * @param code The schedule cde (required) * @return APIrunScheduleRequest * @http.response.details
Status Code Description Response Headers
202 Accepted -
400 The details of the input related failure -
0 Error response -
*/ public APIrunScheduleRequest runSchedule(String scope, String code) { return new APIrunScheduleRequest(scope, code); } private okhttp3.Call updateScheduleCall(String scope, String code, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { return updateScheduleCall(scope, code, updateScheduleRequest, _callback, new ConfigurationOptions()); } private okhttp3.Call updateScheduleCall(String scope, String code, UpdateScheduleRequest updateScheduleRequest, 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 = updateScheduleRequest; // create path and map variables String localVarPath = "/api/schedules/{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 = { "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); 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 updateScheduleValidateBeforeCall(String scope, String code, UpdateScheduleRequest updateScheduleRequest, 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 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)"); } return updateScheduleCall(scope, code, updateScheduleRequest, _callback, opts); } private ApiResponse updateScheduleWithHttpInfo(String scope, String code, UpdateScheduleRequest updateScheduleRequest) throws ApiException { okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scope, code, updateScheduleRequest, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse updateScheduleWithHttpInfo(String scope, String code, UpdateScheduleRequest updateScheduleRequest, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scope, code, updateScheduleRequest, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updateScheduleAsync(String scope, String code, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scope, code, updateScheduleRequest, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call updateScheduleAsync(String scope, String code, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scope, code, updateScheduleRequest, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIupdateScheduleRequest { private final String scope; private final String code; private final UpdateScheduleRequest updateScheduleRequest; private APIupdateScheduleRequest(String scope, String code, UpdateScheduleRequest updateScheduleRequest) { this.scope = scope; this.code = code; this.updateScheduleRequest = updateScheduleRequest; } /** * Build call for updateSchedule * @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 -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updateScheduleCall(scope, code, updateScheduleRequest, _callback); } /** * Execute updateSchedule request * @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 execute() throws ApiException { ApiResponse localVarResp = updateScheduleWithHttpInfo(scope, code, updateScheduleRequest); return localVarResp.getData(); } /** * Execute updateSchedule request. Use any specified configuration options to override any other configuration for this request only. * @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 execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = updateScheduleWithHttpInfo(scope, code, updateScheduleRequest, opts); return localVarResp.getData(); } /** * Execute updateSchedule request with HTTP info returned * @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 executeWithHttpInfo() throws ApiException { return updateScheduleWithHttpInfo(scope, code, updateScheduleRequest); } /** * Execute updateSchedule request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return updateScheduleWithHttpInfo(scope, code, updateScheduleRequest, opts); } /** * Execute updateSchedule 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updateScheduleAsync(scope, code, updateScheduleRequest, _callback); } /** * Execute updateSchedule 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 -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return updateScheduleAsync(scope, code, updateScheduleRequest, _callback, opts); } } /** * [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 APIupdateScheduleRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIupdateScheduleRequest updateSchedule(String scope, String code, UpdateScheduleRequest updateScheduleRequest) { return new APIupdateScheduleRequest(scope, code, updateScheduleRequest); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy