Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* FINBOURNE Workflow API
*
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.finbourne.workflow.api;
import com.finbourne.workflow.ApiCallback;
import com.finbourne.workflow.ApiClient;
import com.finbourne.workflow.ApiException;
import com.finbourne.workflow.ApiResponse;
import com.finbourne.workflow.Configuration;
import com.finbourne.workflow.Pair;
import com.finbourne.workflow.ProgressRequestBody;
import com.finbourne.workflow.ProgressResponseBody;
import com.finbourne.workflow.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.workflow.model.CreateWorkerRequest;
import com.finbourne.workflow.model.DeletedEntityResponse;
import com.finbourne.workflow.model.GetWorkerResultResponse;
import com.finbourne.workflow.model.LusidProblemDetails;
import com.finbourne.workflow.model.LusidValidationProblemDetails;
import java.time.OffsetDateTime;
import com.finbourne.workflow.model.PagedResourceListOfWorker;
import com.finbourne.workflow.model.RunWorkerRequest;
import com.finbourne.workflow.model.RunWorkerResponse;
import java.util.UUID;
import com.finbourne.workflow.model.UpdateWorkerRequest;
import com.finbourne.workflow.model.Worker;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class WorkersApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public WorkersApi() {
this(Configuration.getDefaultApiClient());
}
public WorkersApi(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 createWorkerCall(CreateWorkerRequest createWorkerRequest, final ApiCallback _callback) throws ApiException {
return createWorkerCall(createWorkerRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call createWorkerCall(CreateWorkerRequest createWorkerRequest, 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 = createWorkerRequest;
// create path and map variables
String localVarPath = "/api/workers";
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 createWorkerValidateBeforeCall(CreateWorkerRequest createWorkerRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'createWorkerRequest' is set
if (createWorkerRequest == null) {
throw new ApiException("Missing the required parameter 'createWorkerRequest' when calling createWorker(Async)");
}
return createWorkerCall(createWorkerRequest, _callback, opts);
}
private ApiResponse createWorkerWithHttpInfo(CreateWorkerRequest createWorkerRequest) throws ApiException {
okhttp3.Call localVarCall = createWorkerValidateBeforeCall(createWorkerRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createWorkerWithHttpInfo(CreateWorkerRequest createWorkerRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createWorkerValidateBeforeCall(createWorkerRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createWorkerAsync(CreateWorkerRequest createWorkerRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createWorkerValidateBeforeCall(createWorkerRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createWorkerAsync(CreateWorkerRequest createWorkerRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createWorkerValidateBeforeCall(createWorkerRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreateWorkerRequest {
private final CreateWorkerRequest createWorkerRequest;
private APIcreateWorkerRequest(CreateWorkerRequest createWorkerRequest) {
this.createWorkerRequest = createWorkerRequest;
}
/**
* Build call for createWorker
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return createWorkerCall(createWorkerRequest, _callback);
}
/**
* Execute createWorker request
* @return Worker
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Worker execute() throws ApiException {
ApiResponse localVarResp = createWorkerWithHttpInfo(createWorkerRequest);
return localVarResp.getData();
}
/**
* Execute createWorker request. Use any specified configuration options to override any other configuration for this request only.
* @return Worker
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Worker execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = createWorkerWithHttpInfo(createWorkerRequest, opts);
return localVarResp.getData();
}
/**
* Execute createWorker request with HTTP info returned
* @return ApiResponse<Worker>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return createWorkerWithHttpInfo(createWorkerRequest);
}
/**
* Execute createWorker request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Worker>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return createWorkerWithHttpInfo(createWorkerRequest, opts);
}
/**
* Execute createWorker request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return createWorkerAsync(createWorkerRequest, _callback);
}
/**
* Execute createWorker request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return createWorkerAsync(createWorkerRequest, _callback, opts);
}
}
/**
* [EXPERIMENTAL] CreateWorker: Create a new Worker
* If the Worker already exists a failure will be returned
* @param createWorkerRequest Worker to be created (required)
* @return APIcreateWorkerRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreateWorkerRequest createWorker(CreateWorkerRequest createWorkerRequest) {
return new APIcreateWorkerRequest(createWorkerRequest);
}
private okhttp3.Call deleteWorkerCall(String scope, String code, final ApiCallback _callback) throws ApiException {
return deleteWorkerCall(scope, code, _callback, new ConfigurationOptions());
}
private okhttp3.Call deleteWorkerCall(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/workers/{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 deleteWorkerValidateBeforeCall(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 deleteWorker(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling deleteWorker(Async)");
}
return deleteWorkerCall(scope, code, _callback, opts);
}
private ApiResponse deleteWorkerWithHttpInfo(String scope, String code) throws ApiException {
okhttp3.Call localVarCall = deleteWorkerValidateBeforeCall(scope, code, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse deleteWorkerWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteWorkerValidateBeforeCall(scope, code, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call deleteWorkerAsync(String scope, String code, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteWorkerValidateBeforeCall(scope, code, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call deleteWorkerAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteWorkerValidateBeforeCall(scope, code, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIdeleteWorkerRequest {
private final String scope;
private final String code;
private APIdeleteWorkerRequest(String scope, String code) {
this.scope = scope;
this.code = code;
}
/**
* Build call for deleteWorker
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return deleteWorkerCall(scope, code, _callback);
}
/**
* Execute deleteWorker request
* @return DeletedEntityResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public DeletedEntityResponse execute() throws ApiException {
ApiResponse localVarResp = deleteWorkerWithHttpInfo(scope, code);
return localVarResp.getData();
}
/**
* Execute deleteWorker request. Use any specified configuration options to override any other configuration for this request only.
* @return DeletedEntityResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public DeletedEntityResponse execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = deleteWorkerWithHttpInfo(scope, code, opts);
return localVarResp.getData();
}
/**
* Execute deleteWorker request with HTTP info returned
* @return ApiResponse<DeletedEntityResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return deleteWorkerWithHttpInfo(scope, code);
}
/**
* Execute deleteWorker request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<DeletedEntityResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return deleteWorkerWithHttpInfo(scope, code, opts);
}
/**
* Execute deleteWorker request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return deleteWorkerAsync(scope, code, _callback);
}
/**
* Execute deleteWorker request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return deleteWorkerAsync(scope, code, _callback, opts);
}
}
/**
* [EXPERIMENTAL] DeleteWorker: Delete a Worker
* If the Worker does not exist a failure will be returned
* @param scope Scope of the worker to be deleted (required)
* @param code Code of the worker to be deleted (required)
* @return APIdeleteWorkerRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public APIdeleteWorkerRequest deleteWorker(String scope, String code) {
return new APIdeleteWorkerRequest(scope, code);
}
private okhttp3.Call getWorkerCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException {
return getWorkerCall(scope, code, asAt, _callback, new ConfigurationOptions());
}
private okhttp3.Call getWorkerCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/workers/{scope}/{code}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (asAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt));
}
final String[] localVarAccepts = {
"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 getWorkerValidateBeforeCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling getWorker(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling getWorker(Async)");
}
return getWorkerCall(scope, code, asAt, _callback, opts);
}
private ApiResponse getWorkerWithHttpInfo(String scope, String code, OffsetDateTime asAt) throws ApiException {
okhttp3.Call localVarCall = getWorkerValidateBeforeCall(scope, code, asAt, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getWorkerWithHttpInfo(String scope, String code, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getWorkerValidateBeforeCall(scope, code, asAt, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getWorkerAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getWorkerValidateBeforeCall(scope, code, asAt, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getWorkerAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getWorkerValidateBeforeCall(scope, code, asAt, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetWorkerRequest {
private final String scope;
private final String code;
private OffsetDateTime asAt;
private APIgetWorkerRequest(String scope, String code) {
this.scope = scope;
this.code = code;
}
/**
* Set asAt
* @param asAt The asAt datetime at which to retrieve the Worker. Defaults to returning the latest version of the Worker if not specified. (optional)
* @return APIgetWorkerRequest
*/
public APIgetWorkerRequest asAt(OffsetDateTime asAt) {
this.asAt = asAt;
return this;
}
/**
* Build call for getWorker
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getWorkerCall(scope, code, asAt, _callback);
}
/**
* Execute getWorker request
* @return Worker
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Worker execute() throws ApiException {
ApiResponse localVarResp = getWorkerWithHttpInfo(scope, code, asAt);
return localVarResp.getData();
}
/**
* Execute getWorker request. Use any specified configuration options to override any other configuration for this request only.
* @return Worker
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Worker execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getWorkerWithHttpInfo(scope, code, asAt, opts);
return localVarResp.getData();
}
/**
* Execute getWorker request with HTTP info returned
* @return ApiResponse<Worker>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getWorkerWithHttpInfo(scope, code, asAt);
}
/**
* Execute getWorker request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Worker>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getWorkerWithHttpInfo(scope, code, asAt, opts);
}
/**
* Execute getWorker request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getWorkerAsync(scope, code, asAt, _callback);
}
/**
* Execute getWorker request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getWorkerAsync(scope, code, asAt, _callback, opts);
}
}
/**
* [EXPERIMENTAL] GetWorker: Get a Worker
* Will return a NotFound failure if the Worker does not exist
* @param scope Scope of the worker (required)
* @param code Code of the worker (required)
* @return APIgetWorkerRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIgetWorkerRequest getWorker(String scope, String code) {
return new APIgetWorkerRequest(scope, code);
}
private okhttp3.Call getWorkerResultCall(UUID runId, final ApiCallback _callback) throws ApiException {
return getWorkerResultCall(runId, _callback, new ConfigurationOptions());
}
private okhttp3.Call getWorkerResultCall(UUID runId, 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/workers/{runId}/$result"
.replace("{" + "runId" + "}", localVarApiClient.escapeString(runId.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 getWorkerResultValidateBeforeCall(UUID runId, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'runId' is set
if (runId == null) {
throw new ApiException("Missing the required parameter 'runId' when calling getWorkerResult(Async)");
}
return getWorkerResultCall(runId, _callback, opts);
}
private ApiResponse getWorkerResultWithHttpInfo(UUID runId) throws ApiException {
okhttp3.Call localVarCall = getWorkerResultValidateBeforeCall(runId, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getWorkerResultWithHttpInfo(UUID runId, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getWorkerResultValidateBeforeCall(runId, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getWorkerResultAsync(UUID runId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getWorkerResultValidateBeforeCall(runId, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getWorkerResultAsync(UUID runId, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getWorkerResultValidateBeforeCall(runId, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetWorkerResultRequest {
private final UUID runId;
private APIgetWorkerResultRequest(UUID runId) {
this.runId = runId;
}
/**
* Build call for getWorkerResult
* @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 getWorkerResultCall(runId, _callback);
}
/**
* Execute getWorkerResult request
* @return GetWorkerResultResponse
* @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 GetWorkerResultResponse execute() throws ApiException {
ApiResponse localVarResp = getWorkerResultWithHttpInfo(runId);
return localVarResp.getData();
}
/**
* Execute getWorkerResult request. Use any specified configuration options to override any other configuration for this request only.
* @return GetWorkerResultResponse
* @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 GetWorkerResultResponse execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getWorkerResultWithHttpInfo(runId, opts);
return localVarResp.getData();
}
/**
* Execute getWorkerResult request with HTTP info returned
* @return ApiResponse<GetWorkerResultResponse>
* @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 getWorkerResultWithHttpInfo(runId);
}
/**
* Execute getWorkerResult request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<GetWorkerResultResponse>
* @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 getWorkerResultWithHttpInfo(runId, opts);
}
/**
* Execute getWorkerResult 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 getWorkerResultAsync(runId, _callback);
}
/**
* Execute getWorkerResult 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 getWorkerResultAsync(runId, _callback, opts);
}
}
/**
* [EXPERIMENTAL] GetWorkerResult: Get the status of a specific run of a worker with any relevant results
*
* @param runId The ID returned when calling Run Worker (required)
* @return APIgetWorkerResultRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIgetWorkerResultRequest getWorkerResult(UUID runId) {
return new APIgetWorkerResultRequest(runId);
}
private okhttp3.Call listWorkersCall(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback) throws ApiException {
return listWorkersCall(asAt, filter, sortBy, limit, page, _callback, new ConfigurationOptions());
}
private okhttp3.Call listWorkersCall(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/workers";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (asAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (sortBy != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
final String[] localVarAccepts = {
"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 listWorkersValidateBeforeCall(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return listWorkersCall(asAt, filter, sortBy, limit, page, _callback, opts);
}
private ApiResponse listWorkersWithHttpInfo(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page) throws ApiException {
okhttp3.Call localVarCall = listWorkersValidateBeforeCall(asAt, filter, sortBy, limit, page, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse listWorkersWithHttpInfo(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listWorkersValidateBeforeCall(asAt, filter, sortBy, limit, page, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listWorkersAsync(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listWorkersValidateBeforeCall(asAt, filter, sortBy, limit, page, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call listWorkersAsync(OffsetDateTime asAt, String filter, List sortBy, Integer limit, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listWorkersValidateBeforeCall(asAt, filter, sortBy, limit, page, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistWorkersRequest {
private OffsetDateTime asAt;
private String filter;
private List sortBy;
private Integer limit;
private String page;
private APIlistWorkersRequest() {
}
/**
* Set asAt
* @param asAt The asAt datetime at which to list the Workers. Defaults to return the latest version of each Worker if not specified. (optional)
* @return APIlistWorkersRequest
*/
public APIlistWorkersRequest asAt(OffsetDateTime asAt) {
this.asAt = asAt;
return this;
}
/**
* Set filter
* @param filter Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid. (optional)
* @return APIlistWorkersRequest
*/
public APIlistWorkersRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set sortBy
* @param sortBy A list of field names or properties to sort by, each optionally suffixed by \" ASC\" or \" DESC\" (optional)
* @return APIlistWorkersRequest
*/
public APIlistWorkersRequest sortBy(List sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set limit
* @param limit When paginating, limit the number of returned results to this many. (optional, default to 10)
* @return APIlistWorkersRequest
*/
public APIlistWorkersRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page The pagination token to use to continue listing workers from a previous call to list workers. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request. (optional)
* @return APIlistWorkersRequest
*/
public APIlistWorkersRequest page(String page) {
this.page = page;
return this;
}
/**
* Build call for listWorkers
* @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 listWorkersCall(asAt, filter, sortBy, limit, page, _callback);
}
/**
* Execute listWorkers request
* @return PagedResourceListOfWorker
* @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 PagedResourceListOfWorker execute() throws ApiException {
ApiResponse localVarResp = listWorkersWithHttpInfo(asAt, filter, sortBy, limit, page);
return localVarResp.getData();
}
/**
* Execute listWorkers request. Use any specified configuration options to override any other configuration for this request only.
* @return PagedResourceListOfWorker
* @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 PagedResourceListOfWorker execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = listWorkersWithHttpInfo(asAt, filter, sortBy, limit, page, opts);
return localVarResp.getData();
}
/**
* Execute listWorkers request with HTTP info returned
* @return ApiResponse<PagedResourceListOfWorker>
* @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 listWorkersWithHttpInfo(asAt, filter, sortBy, limit, page);
}
/**
* Execute listWorkers request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<PagedResourceListOfWorker>
* @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 listWorkersWithHttpInfo(asAt, filter, sortBy, limit, page, opts);
}
/**
* Execute listWorkers 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 listWorkersAsync(asAt, filter, sortBy, limit, page, _callback);
}
/**
* Execute listWorkers 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
*/
public APIlistWorkersRequest listWorkers() {
return new APIlistWorkersRequest();
}
private okhttp3.Call runWorkerCall(String scope, String code, RunWorkerRequest runWorkerRequest, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException {
return runWorkerCall(scope, code, runWorkerRequest, asAt, _callback, new ConfigurationOptions());
}
private okhttp3.Call runWorkerCall(String scope, String code, RunWorkerRequest runWorkerRequest, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = runWorkerRequest;
// create path and map variables
String localVarPath = "/api/workers/{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();
if (asAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt));
}
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 runWorkerValidateBeforeCall(String scope, String code, RunWorkerRequest runWorkerRequest, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling runWorker(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling runWorker(Async)");
}
// verify the required parameter 'runWorkerRequest' is set
if (runWorkerRequest == null) {
throw new ApiException("Missing the required parameter 'runWorkerRequest' when calling runWorker(Async)");
}
return runWorkerCall(scope, code, runWorkerRequest, asAt, _callback, opts);
}
private ApiResponse runWorkerWithHttpInfo(String scope, String code, RunWorkerRequest runWorkerRequest, OffsetDateTime asAt) throws ApiException {
okhttp3.Call localVarCall = runWorkerValidateBeforeCall(scope, code, runWorkerRequest, asAt, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse runWorkerWithHttpInfo(String scope, String code, RunWorkerRequest runWorkerRequest, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = runWorkerValidateBeforeCall(scope, code, runWorkerRequest, asAt, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call runWorkerAsync(String scope, String code, RunWorkerRequest runWorkerRequest, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = runWorkerValidateBeforeCall(scope, code, runWorkerRequest, asAt, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call runWorkerAsync(String scope, String code, RunWorkerRequest runWorkerRequest, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = runWorkerValidateBeforeCall(scope, code, runWorkerRequest, asAt, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIrunWorkerRequest {
private final String scope;
private final String code;
private final RunWorkerRequest runWorkerRequest;
private OffsetDateTime asAt;
private APIrunWorkerRequest(String scope, String code, RunWorkerRequest runWorkerRequest) {
this.scope = scope;
this.code = code;
this.runWorkerRequest = runWorkerRequest;
}
/**
* Set asAt
* @param asAt The asAt datetime at which to retrieve the Worker. Defaults to returning the latest version of the Worker if not specified. (optional)
* @return APIrunWorkerRequest
*/
public APIrunWorkerRequest asAt(OffsetDateTime asAt) {
this.asAt = asAt;
return this;
}
/**
* Build call for runWorker
* @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 runWorkerCall(scope, code, runWorkerRequest, asAt, _callback);
}
/**
* Execute runWorker request
* @return RunWorkerResponse
* @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 RunWorkerResponse execute() throws ApiException {
ApiResponse localVarResp = runWorkerWithHttpInfo(scope, code, runWorkerRequest, asAt);
return localVarResp.getData();
}
/**
* Execute runWorker request. Use any specified configuration options to override any other configuration for this request only.
* @return RunWorkerResponse
* @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 RunWorkerResponse execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = runWorkerWithHttpInfo(scope, code, runWorkerRequest, asAt, opts);
return localVarResp.getData();
}
/**
* Execute runWorker request with HTTP info returned
* @return ApiResponse<RunWorkerResponse>
* @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 runWorkerWithHttpInfo(scope, code, runWorkerRequest, asAt);
}
/**
* Execute runWorker request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<RunWorkerResponse>
* @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 runWorkerWithHttpInfo(scope, code, runWorkerRequest, asAt, opts);
}
/**
* Execute runWorker 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 runWorkerAsync(scope, code, runWorkerRequest, asAt, _callback);
}
/**
* Execute runWorker 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 runWorkerAsync(scope, code, runWorkerRequest, asAt, _callback, opts);
}
}
/**
* [EXPERIMENTAL] RunWorker: Run a Worker
*
* @param scope Scope of the worker (required)
* @param code Code of the worker (required)
* @param runWorkerRequest (required)
* @return APIrunWorkerRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIrunWorkerRequest runWorker(String scope, String code, RunWorkerRequest runWorkerRequest) {
return new APIrunWorkerRequest(scope, code, runWorkerRequest);
}
private okhttp3.Call updateWorkerCall(String scope, String code, UpdateWorkerRequest updateWorkerRequest, final ApiCallback _callback) throws ApiException {
return updateWorkerCall(scope, code, updateWorkerRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call updateWorkerCall(String scope, String code, UpdateWorkerRequest updateWorkerRequest, 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 = updateWorkerRequest;
// create path and map variables
String localVarPath = "/api/workers/{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 updateWorkerValidateBeforeCall(String scope, String code, UpdateWorkerRequest updateWorkerRequest, 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 updateWorker(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling updateWorker(Async)");
}
// verify the required parameter 'updateWorkerRequest' is set
if (updateWorkerRequest == null) {
throw new ApiException("Missing the required parameter 'updateWorkerRequest' when calling updateWorker(Async)");
}
return updateWorkerCall(scope, code, updateWorkerRequest, _callback, opts);
}
private ApiResponse updateWorkerWithHttpInfo(String scope, String code, UpdateWorkerRequest updateWorkerRequest) throws ApiException {
okhttp3.Call localVarCall = updateWorkerValidateBeforeCall(scope, code, updateWorkerRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse updateWorkerWithHttpInfo(String scope, String code, UpdateWorkerRequest updateWorkerRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateWorkerValidateBeforeCall(scope, code, updateWorkerRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call updateWorkerAsync(String scope, String code, UpdateWorkerRequest updateWorkerRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateWorkerValidateBeforeCall(scope, code, updateWorkerRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call updateWorkerAsync(String scope, String code, UpdateWorkerRequest updateWorkerRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateWorkerValidateBeforeCall(scope, code, updateWorkerRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIupdateWorkerRequest {
private final String scope;
private final String code;
private final UpdateWorkerRequest updateWorkerRequest;
private APIupdateWorkerRequest(String scope, String code, UpdateWorkerRequest updateWorkerRequest) {
this.scope = scope;
this.code = code;
this.updateWorkerRequest = updateWorkerRequest;
}
/**
* Build call for updateWorker
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return updateWorkerCall(scope, code, updateWorkerRequest, _callback);
}
/**
* Execute updateWorker request
* @return Worker
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public Worker execute() throws ApiException {
ApiResponse localVarResp = updateWorkerWithHttpInfo(scope, code, updateWorkerRequest);
return localVarResp.getData();
}
/**
* Execute updateWorker request. Use any specified configuration options to override any other configuration for this request only.
* @return Worker
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public Worker execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = updateWorkerWithHttpInfo(scope, code, updateWorkerRequest, opts);
return localVarResp.getData();
}
/**
* Execute updateWorker request with HTTP info returned
* @return ApiResponse<Worker>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return updateWorkerWithHttpInfo(scope, code, updateWorkerRequest);
}
/**
* Execute updateWorker request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Worker>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return updateWorkerWithHttpInfo(scope, code, updateWorkerRequest, opts);
}
/**
* Execute updateWorker request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return updateWorkerAsync(scope, code, updateWorkerRequest, _callback);
}
/**
* Execute updateWorker request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return updateWorkerAsync(scope, code, updateWorkerRequest, _callback, opts);
}
}
/**
* [EXPERIMENTAL] UpdateWorker: Update a Worker
* If the Worker does not exist a failure will be returned
* @param scope Scope of the worker to be updated (required)
* @param code Code of the worker to be updated (required)
* @param updateWorkerRequest State of the updated worker (required)
* @return APIupdateWorkerRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
Worker not found.
-
0
Error response
-
*/
public APIupdateWorkerRequest updateWorker(String scope, String code, UpdateWorkerRequest updateWorkerRequest) {
return new APIupdateWorkerRequest(scope, code, updateWorkerRequest);
}
}