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 Access Management API
* ### Introduction This page documents the LUSID Access Management APIs from FINBOURNE Technology, which allow authorised users to query and update their access control policies and roles within the LUSID platform's Identity and Access Management system.
*
* The version of the OpenAPI document: 0.0.3031
* 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.access.api;
import com.finbourne.access.ApiCallback;
import com.finbourne.access.ApiClient;
import com.finbourne.access.ApiException;
import com.finbourne.access.ApiResponse;
import com.finbourne.access.Configuration;
import com.finbourne.access.Pair;
import com.finbourne.access.ProgressRequestBody;
import com.finbourne.access.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.access.model.AddToPolicyCollectionRequest;
import com.finbourne.access.model.AttachedPolicyDefinitionResponse;
import com.finbourne.access.model.EvaluationRequest;
import com.finbourne.access.model.EvaluationResponse;
import com.finbourne.access.model.LusidProblemDetails;
import com.finbourne.access.model.LusidValidationProblemDetails;
import java.time.OffsetDateTime;
import com.finbourne.access.model.PolicyCollectionCreationRequest;
import com.finbourne.access.model.PolicyCollectionResponse;
import com.finbourne.access.model.PolicyCollectionUpdateRequest;
import com.finbourne.access.model.PolicyCreationRequest;
import com.finbourne.access.model.PolicyResponse;
import com.finbourne.access.model.PolicyUpdateRequest;
import com.finbourne.access.model.RemoveFromPolicyCollectionRequest;
import com.finbourne.access.model.ResourceListOfPolicyCollectionResponse;
import com.finbourne.access.model.ResourceListOfPolicyResponse;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PoliciesApi {
private ApiClient localVarApiClient;
public PoliciesApi() {
this(Configuration.getDefaultApiClient());
}
public PoliciesApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for addToPolicyCollection
* @param code The code of the PolicyCollection (required)
* @param addToPolicyCollectionRequest Ids of the PolicyCollections and/or Policies to add to the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call addToPolicyCollectionCall(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = addToPolicyCollectionRequest;
// create path and map variables
String localVarPath = "/api/policycollections/{code}/add"
.replaceAll("\\{" + "code" + "\\}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (scope != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("scope", scope));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json-patch+json", "application/json", "text/json", "application/_*+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call addToPolicyCollectionValidateBeforeCall(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling addToPolicyCollection(Async)");
}
// verify the required parameter 'addToPolicyCollectionRequest' is set
if (addToPolicyCollectionRequest == null) {
throw new ApiException("Missing the required parameter 'addToPolicyCollectionRequest' when calling addToPolicyCollection(Async)");
}
okhttp3.Call localVarCall = addToPolicyCollectionCall(code, addToPolicyCollectionRequest, scope, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] AddToPolicyCollection: Add To PolicyCollection
* Add Policies and/or PolicyCollections to a PolicyCollection
* @param code The code of the PolicyCollection (required)
* @param addToPolicyCollectionRequest Ids of the PolicyCollections and/or Policies to add to the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @return PolicyCollectionResponse
* @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
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public PolicyCollectionResponse addToPolicyCollection(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope) throws ApiException {
ApiResponse localVarResp = addToPolicyCollectionWithHttpInfo(code, addToPolicyCollectionRequest, scope);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] AddToPolicyCollection: Add To PolicyCollection
* Add Policies and/or PolicyCollections to a PolicyCollection
* @param code The code of the PolicyCollection (required)
* @param addToPolicyCollectionRequest Ids of the PolicyCollections and/or Policies to add to the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @return ApiResponse<PolicyCollectionResponse>
* @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
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse addToPolicyCollectionWithHttpInfo(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope) throws ApiException {
okhttp3.Call localVarCall = addToPolicyCollectionValidateBeforeCall(code, addToPolicyCollectionRequest, scope, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] AddToPolicyCollection: Add To PolicyCollection (asynchronously)
* Add Policies and/or PolicyCollections to a PolicyCollection
* @param code The code of the PolicyCollection (required)
* @param addToPolicyCollectionRequest Ids of the PolicyCollections and/or Policies to add to the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call addToPolicyCollectionAsync(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addToPolicyCollectionValidateBeforeCall(code, addToPolicyCollectionRequest, scope, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for createPolicy
* @param policyCreationRequest The definition of the Policy (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call createPolicyCall(PolicyCreationRequest policyCreationRequest, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = policyCreationRequest;
// create path and map variables
String localVarPath = "/api/policies";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json-patch+json", "application/json", "text/json", "application/_*+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createPolicyValidateBeforeCall(PolicyCreationRequest policyCreationRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'policyCreationRequest' is set
if (policyCreationRequest == null) {
throw new ApiException("Missing the required parameter 'policyCreationRequest' when calling createPolicy(Async)");
}
okhttp3.Call localVarCall = createPolicyCall(policyCreationRequest, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] CreatePolicy: Create Policy
* Creates a Policy
* @param policyCreationRequest The definition of the Policy (required)
* @return PolicyResponse
* @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 policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public PolicyResponse createPolicy(PolicyCreationRequest policyCreationRequest) throws ApiException {
ApiResponse localVarResp = createPolicyWithHttpInfo(policyCreationRequest);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] CreatePolicy: Create Policy
* Creates a Policy
* @param policyCreationRequest The definition of the Policy (required)
* @return ApiResponse<PolicyResponse>
* @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 policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse createPolicyWithHttpInfo(PolicyCreationRequest policyCreationRequest) throws ApiException {
okhttp3.Call localVarCall = createPolicyValidateBeforeCall(policyCreationRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] CreatePolicy: Create Policy (asynchronously)
* Creates a Policy
* @param policyCreationRequest The definition of the Policy (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call createPolicyAsync(PolicyCreationRequest policyCreationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createPolicyValidateBeforeCall(policyCreationRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for createPolicyCollection
* @param policyCollectionCreationRequest The definition of the PolicyCollection (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call createPolicyCollectionCall(PolicyCollectionCreationRequest policyCollectionCreationRequest, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = policyCollectionCreationRequest;
// create path and map variables
String localVarPath = "/api/policycollections";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json-patch+json", "application/json", "text/json", "application/_*+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createPolicyCollectionValidateBeforeCall(PolicyCollectionCreationRequest policyCollectionCreationRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'policyCollectionCreationRequest' is set
if (policyCollectionCreationRequest == null) {
throw new ApiException("Missing the required parameter 'policyCollectionCreationRequest' when calling createPolicyCollection(Async)");
}
okhttp3.Call localVarCall = createPolicyCollectionCall(policyCollectionCreationRequest, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] CreatePolicyCollection: Create PolicyCollection
* Creates a PolicyCollection
* @param policyCollectionCreationRequest The definition of the PolicyCollection (required)
* @return PolicyCollectionResponse
* @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 PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public PolicyCollectionResponse createPolicyCollection(PolicyCollectionCreationRequest policyCollectionCreationRequest) throws ApiException {
ApiResponse localVarResp = createPolicyCollectionWithHttpInfo(policyCollectionCreationRequest);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] CreatePolicyCollection: Create PolicyCollection
* Creates a PolicyCollection
* @param policyCollectionCreationRequest The definition of the PolicyCollection (required)
* @return ApiResponse<PolicyCollectionResponse>
* @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 PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse createPolicyCollectionWithHttpInfo(PolicyCollectionCreationRequest policyCollectionCreationRequest) throws ApiException {
okhttp3.Call localVarCall = createPolicyCollectionValidateBeforeCall(policyCollectionCreationRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] CreatePolicyCollection: Create PolicyCollection (asynchronously)
* Creates a PolicyCollection
* @param policyCollectionCreationRequest The definition of the PolicyCollection (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call createPolicyCollectionAsync(PolicyCollectionCreationRequest policyCollectionCreationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createPolicyCollectionValidateBeforeCall(policyCollectionCreationRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deletePolicy
* @param code The code of the Policy (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the Policy (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call deletePolicyCall(String code, String scope, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/policies/{code}"
.replaceAll("\\{" + "code" + "\\}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (scope != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("scope", scope));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deletePolicyValidateBeforeCall(String code, String scope, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling deletePolicy(Async)");
}
okhttp3.Call localVarCall = deletePolicyCall(code, scope, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] DeletePolicy: Delete Policy
* Deletes an identified Policy
* @param code The code of the Policy (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the Policy (optional)
* @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 deletePolicy(String code, String scope) throws ApiException {
deletePolicyWithHttpInfo(code, scope);
}
/**
* [EARLY ACCESS] DeletePolicy: Delete Policy
* Deletes an identified Policy
* @param code The code of the Policy (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the Policy (optional)
* @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 deletePolicyWithHttpInfo(String code, String scope) throws ApiException {
okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(code, scope, null);
return localVarApiClient.execute(localVarCall);
}
/**
* [EARLY ACCESS] DeletePolicy: Delete Policy (asynchronously)
* Deletes an identified Policy
* @param code The code of the Policy (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the Policy (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call deletePolicyAsync(String code, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(code, scope, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for deletePolicyCollection
* @param code The code of the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call deletePolicyCollectionCall(String code, String scope, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/policycollections/{code}"
.replaceAll("\\{" + "code" + "\\}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (scope != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("scope", scope));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deletePolicyCollectionValidateBeforeCall(String code, String scope, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling deletePolicyCollection(Async)");
}
okhttp3.Call localVarCall = deletePolicyCollectionCall(code, scope, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] DeletePolicyCollection: Delete PolicyCollection
* Deletes an identified PolicyCollection
* @param code The code of the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @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 deletePolicyCollection(String code, String scope) throws ApiException {
deletePolicyCollectionWithHttpInfo(code, scope);
}
/**
* [EARLY ACCESS] DeletePolicyCollection: Delete PolicyCollection
* Deletes an identified PolicyCollection
* @param code The code of the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @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 deletePolicyCollectionWithHttpInfo(String code, String scope) throws ApiException {
okhttp3.Call localVarCall = deletePolicyCollectionValidateBeforeCall(code, scope, null);
return localVarApiClient.execute(localVarCall);
}
/**
* [EARLY ACCESS] DeletePolicyCollection: Delete PolicyCollection (asynchronously)
* Deletes an identified PolicyCollection
* @param code The code of the PolicyCollection (required)
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call deletePolicyCollectionAsync(String code, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deletePolicyCollectionValidateBeforeCall(code, scope, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for evaluate
* @param requestBody A dictionary of evaluations, keyed using any arbitrary correlation id (it will be returned with the response for that evaluation). (required)
* @param applications Optional. The application type of the roles and policies to use when evaluating. (optional)
* @param asAt Optional. The requested AsAt date of the entitlements (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Run an evaluation against the current user's entitlements
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call evaluateCall(Map requestBody, List applications, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = requestBody;
// create path and map variables
String localVarPath = "/api/me";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (applications != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applications", applications));
}
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);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call evaluateValidateBeforeCall(Map requestBody, List applications, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling evaluate(Async)");
}
okhttp3.Call localVarCall = evaluateCall(requestBody, applications, asAt, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] Evaluate: Run one or more evaluations
* Given a dictionary of evaluation requests (keyed by any arbitrary correlation identifier), each will be evaluated according to the current user's policies (deduced from the provided OAuth token).
* @param requestBody A dictionary of evaluations, keyed using any arbitrary correlation id (it will be returned with the response for that evaluation). (required)
* @param applications Optional. The application type of the roles and policies to use when evaluating. (optional)
* @param asAt Optional. The requested AsAt date of the entitlements (optional)
* @return Map<String, EvaluationResponse>
* @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
Run an evaluation against the current user's entitlements
-
400
The details of the input related failure
-
0
Error response
-
*/
public Map evaluate(Map requestBody, List applications, OffsetDateTime asAt) throws ApiException {
ApiResponse