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.AddPolicyCollectionToRoleRequest;
import com.finbourne.access.model.LusidProblemDetails;
import com.finbourne.access.model.LusidValidationProblemDetails;
import java.time.OffsetDateTime;
import com.finbourne.access.model.RoleCreationRequest;
import com.finbourne.access.model.RoleResponse;
import com.finbourne.access.model.RoleUpdateRequest;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RolesApi {
private ApiClient localVarApiClient;
public RolesApi() {
this(Configuration.getDefaultApiClient());
}
public RolesApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for addPolicyCollectionToRole
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param addPolicyCollectionToRoleRequest The policy collections to add (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call addPolicyCollectionToRoleCall(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = addPolicyCollectionToRoleRequest;
// create path and map variables
String localVarPath = "/api/roles/{scope}/{code}/policycollections"
.replaceAll("\\{" + "scope" + "\\}", localVarApiClient.escapeString(scope.toString()))
.replaceAll("\\{" + "code" + "\\}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json-patch+json", "application/json", "text/json", "application/_*+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call addPolicyCollectionToRoleValidateBeforeCall(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling addPolicyCollectionToRole(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling addPolicyCollectionToRole(Async)");
}
// verify the required parameter 'addPolicyCollectionToRoleRequest' is set
if (addPolicyCollectionToRoleRequest == null) {
throw new ApiException("Missing the required parameter 'addPolicyCollectionToRoleRequest' when calling addPolicyCollectionToRole(Async)");
}
okhttp3.Call localVarCall = addPolicyCollectionToRoleCall(scope, code, addPolicyCollectionToRoleRequest, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] AddPolicyCollectionToRole: Add policy collections to a role
* Assigns policy collections to a role
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param addPolicyCollectionToRoleRequest The policy collections to add (required)
* @return RoleResponse
* @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
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public RoleResponse addPolicyCollectionToRole(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest) throws ApiException {
ApiResponse localVarResp = addPolicyCollectionToRoleWithHttpInfo(scope, code, addPolicyCollectionToRoleRequest);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] AddPolicyCollectionToRole: Add policy collections to a role
* Assigns policy collections to a role
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param addPolicyCollectionToRoleRequest The policy collections to add (required)
* @return ApiResponse<RoleResponse>
* @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
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse addPolicyCollectionToRoleWithHttpInfo(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest) throws ApiException {
okhttp3.Call localVarCall = addPolicyCollectionToRoleValidateBeforeCall(scope, code, addPolicyCollectionToRoleRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] AddPolicyCollectionToRole: Add policy collections to a role (asynchronously)
* Assigns policy collections to a role
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param addPolicyCollectionToRoleRequest The policy collections to add (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call addPolicyCollectionToRoleAsync(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addPolicyCollectionToRoleValidateBeforeCall(scope, code, addPolicyCollectionToRoleRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for createRole
* @param roleCreationRequest The definition of the Role (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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call createRoleCall(RoleCreationRequest roleCreationRequest, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = roleCreationRequest;
// create path and map variables
String localVarPath = "/api/roles";
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 createRoleValidateBeforeCall(RoleCreationRequest roleCreationRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'roleCreationRequest' is set
if (roleCreationRequest == null) {
throw new ApiException("Missing the required parameter 'roleCreationRequest' when calling createRole(Async)");
}
okhttp3.Call localVarCall = createRoleCall(roleCreationRequest, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] CreateRole: Create Role
* Creates a Role
* @param roleCreationRequest The definition of the Role (required)
* @return RoleResponse
* @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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public RoleResponse createRole(RoleCreationRequest roleCreationRequest) throws ApiException {
ApiResponse localVarResp = createRoleWithHttpInfo(roleCreationRequest);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] CreateRole: Create Role
* Creates a Role
* @param roleCreationRequest The definition of the Role (required)
* @return ApiResponse<RoleResponse>
* @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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse createRoleWithHttpInfo(RoleCreationRequest roleCreationRequest) throws ApiException {
okhttp3.Call localVarCall = createRoleValidateBeforeCall(roleCreationRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] CreateRole: Create Role (asynchronously)
* Creates a Role
* @param roleCreationRequest The definition of the Role (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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call createRoleAsync(RoleCreationRequest roleCreationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createRoleValidateBeforeCall(roleCreationRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteRole
* @param code The code of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (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 deleteRoleCall(String code, String scope, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/roles/{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 deleteRoleValidateBeforeCall(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 deleteRole(Async)");
}
okhttp3.Call localVarCall = deleteRoleCall(code, scope, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] DeleteRole: Delete Role
* Deletes an identified Role
* @param code The code of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (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 deleteRole(String code, String scope) throws ApiException {
deleteRoleWithHttpInfo(code, scope);
}
/**
* [EARLY ACCESS] DeleteRole: Delete Role
* Deletes an identified Role
* @param code The code of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (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 deleteRoleWithHttpInfo(String code, String scope) throws ApiException {
okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(code, scope, null);
return localVarApiClient.execute(localVarCall);
}
/**
* [EARLY ACCESS] DeleteRole: Delete Role (asynchronously)
* Deletes an identified Role
* @param code The code of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (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 deleteRoleAsync(String code, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(code, scope, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getRole
* @param code The code of the Role (required)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param scope Optional. Will use default scope if not supplied. The scope of the Role (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
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call getRoleCall(String code, OffsetDateTime asAt, String scope, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/roles/{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 (asAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt));
}
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getRoleValidateBeforeCall(String code, OffsetDateTime asAt, 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 getRole(Async)");
}
okhttp3.Call localVarCall = getRoleCall(code, asAt, scope, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] GetRole: Get Role
* Gets an identified Role
* @param code The code of the Role (required)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param scope Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @return RoleResponse
* @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
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public RoleResponse getRole(String code, OffsetDateTime asAt, String scope) throws ApiException {
ApiResponse localVarResp = getRoleWithHttpInfo(code, asAt, scope);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] GetRole: Get Role
* Gets an identified Role
* @param code The code of the Role (required)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param scope Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @return ApiResponse<RoleResponse>
* @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
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse getRoleWithHttpInfo(String code, OffsetDateTime asAt, String scope) throws ApiException {
okhttp3.Call localVarCall = getRoleValidateBeforeCall(code, asAt, scope, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] GetRole: Get Role (asynchronously)
* Gets an identified Role
* @param code The code of the Role (required)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param scope Optional. Will use default scope if not supplied. The scope of the Role (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
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call getRoleAsync(String code, OffsetDateTime asAt, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRoleValidateBeforeCall(code, asAt, scope, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for listRoles
* @param scope Optional. Will use all scopes if not supplied. The requested scope (optional)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param sortBy Optional. Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName (optional)
* @param start Optional. When paginating, skip this number of results (optional)
* @param limit Optional. When paginating, limit the number of returned results to this many. (optional)
* @param filter Optional. Expression to filter the result set (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call listRolesCall(String scope, OffsetDateTime asAt, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/roles";
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));
}
if (asAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt));
}
if (sortBy != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy));
}
if (start != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listRolesValidateBeforeCall(String scope, OffsetDateTime asAt, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listRolesCall(scope, asAt, sortBy, start, limit, filter, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] ListRoles: List Roles
* Gets all Roles in a scope
* @param scope Optional. Will use all scopes if not supplied. The requested scope (optional)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param sortBy Optional. Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName (optional)
* @param start Optional. When paginating, skip this number of results (optional)
* @param limit Optional. When paginating, limit the number of returned results to this many. (optional)
* @param filter Optional. Expression to filter the result set (optional)
* @return List<RoleResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public List listRoles(String scope, OffsetDateTime asAt, List sortBy, Integer start, Integer limit, String filter) throws ApiException {
ApiResponse> localVarResp = listRolesWithHttpInfo(scope, asAt, sortBy, start, limit, filter);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] ListRoles: List Roles
* Gets all Roles in a scope
* @param scope Optional. Will use all scopes if not supplied. The requested scope (optional)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param sortBy Optional. Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName (optional)
* @param start Optional. When paginating, skip this number of results (optional)
* @param limit Optional. When paginating, limit the number of returned results to this many. (optional)
* @param filter Optional. Expression to filter the result set (optional)
* @return ApiResponse<List<RoleResponse>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse> listRolesWithHttpInfo(String scope, OffsetDateTime asAt, List sortBy, Integer start, Integer limit, String filter) throws ApiException {
okhttp3.Call localVarCall = listRolesValidateBeforeCall(scope, asAt, sortBy, start, limit, filter, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] ListRoles: List Roles (asynchronously)
* Gets all Roles in a scope
* @param scope Optional. Will use all scopes if not supplied. The requested scope (optional)
* @param asAt Optional. The AsAt date time of the data (optional)
* @param sortBy Optional. Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName (optional)
* @param start Optional. When paginating, skip this number of results (optional)
* @param limit Optional. When paginating, limit the number of returned results to this many. (optional)
* @param filter Optional. Expression to filter the result set (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call listRolesAsync(String scope, OffsetDateTime asAt, List sortBy, Integer start, Integer limit, String filter, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = listRolesValidateBeforeCall(scope, asAt, sortBy, start, limit, filter, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for removePolicyCollectionFromRole
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param policycollectionscope The scope of policy collection to remove from the Role (required)
* @param policycollectioncode The code of the policy collection to remove from the Role (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call removePolicyCollectionFromRoleCall(String scope, String code, String policycollectionscope, String policycollectioncode, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/roles/{scope}/{code}/policycollections/{policycollectionscope}/{policycollectioncode}"
.replaceAll("\\{" + "scope" + "\\}", localVarApiClient.escapeString(scope.toString()))
.replaceAll("\\{" + "code" + "\\}", localVarApiClient.escapeString(code.toString()))
.replaceAll("\\{" + "policycollectionscope" + "\\}", localVarApiClient.escapeString(policycollectionscope.toString()))
.replaceAll("\\{" + "policycollectioncode" + "\\}", localVarApiClient.escapeString(policycollectioncode.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
localVarHeaderParams.put("X-LUSID-SDK-Language", "Java");
localVarHeaderParams.put("X-LUSID-SDK-Version", "0.0.3031");
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call removePolicyCollectionFromRoleValidateBeforeCall(String scope, String code, String policycollectionscope, String policycollectioncode, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling removePolicyCollectionFromRole(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling removePolicyCollectionFromRole(Async)");
}
// verify the required parameter 'policycollectionscope' is set
if (policycollectionscope == null) {
throw new ApiException("Missing the required parameter 'policycollectionscope' when calling removePolicyCollectionFromRole(Async)");
}
// verify the required parameter 'policycollectioncode' is set
if (policycollectioncode == null) {
throw new ApiException("Missing the required parameter 'policycollectioncode' when calling removePolicyCollectionFromRole(Async)");
}
okhttp3.Call localVarCall = removePolicyCollectionFromRoleCall(scope, code, policycollectionscope, policycollectioncode, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] RemovePolicyCollectionFromRole: Remove policy collection from role
* Removes a policy collection from a role
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param policycollectionscope The scope of policy collection to remove from the Role (required)
* @param policycollectioncode The code of the policy collection to remove from the Role (required)
* @return RoleResponse
* @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
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public RoleResponse removePolicyCollectionFromRole(String scope, String code, String policycollectionscope, String policycollectioncode) throws ApiException {
ApiResponse localVarResp = removePolicyCollectionFromRoleWithHttpInfo(scope, code, policycollectionscope, policycollectioncode);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] RemovePolicyCollectionFromRole: Remove policy collection from role
* Removes a policy collection from a role
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param policycollectionscope The scope of policy collection to remove from the Role (required)
* @param policycollectioncode The code of the policy collection to remove from the Role (required)
* @return ApiResponse<RoleResponse>
* @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
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse removePolicyCollectionFromRoleWithHttpInfo(String scope, String code, String policycollectionscope, String policycollectioncode) throws ApiException {
okhttp3.Call localVarCall = removePolicyCollectionFromRoleValidateBeforeCall(scope, code, policycollectionscope, policycollectioncode, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] RemovePolicyCollectionFromRole: Remove policy collection from role (asynchronously)
* Removes a policy collection from a role
* @param scope The scope of the Role (required)
* @param code The code of the Role (required)
* @param policycollectionscope The scope of policy collection to remove from the Role (required)
* @param policycollectioncode The code of the policy collection to remove from the Role (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call removePolicyCollectionFromRoleAsync(String scope, String code, String policycollectionscope, String policycollectioncode, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = removePolicyCollectionFromRoleValidateBeforeCall(scope, code, policycollectionscope, policycollectioncode, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateRole
* @param code The code of the Role (required)
* @param roleUpdateRequest The updated definition of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @param beforeScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param beforeCode Optional. The code of the Role (optional)
* @param afterScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param afterCode Optional. The code of the Role (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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call updateRoleCall(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = roleUpdateRequest;
// create path and map variables
String localVarPath = "/api/roles/{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));
}
if (beforeScope != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("beforeScope", beforeScope));
}
if (beforeCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("beforeCode", beforeCode));
}
if (afterScope != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("afterScope", afterScope));
}
if (afterCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("afterCode", afterCode));
}
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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateRoleValidateBeforeCall(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, 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 updateRole(Async)");
}
// verify the required parameter 'roleUpdateRequest' is set
if (roleUpdateRequest == null) {
throw new ApiException("Missing the required parameter 'roleUpdateRequest' when calling updateRole(Async)");
}
okhttp3.Call localVarCall = updateRoleCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback);
return localVarCall;
}
/**
* [EARLY ACCESS] UpdateRole: Update Role
* Updates a Role
* @param code The code of the Role (required)
* @param roleUpdateRequest The updated definition of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @param beforeScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param beforeCode Optional. The code of the Role (optional)
* @param afterScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param afterCode Optional. The code of the Role (optional)
* @return RoleResponse
* @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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public RoleResponse updateRole(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode) throws ApiException {
ApiResponse localVarResp = updateRoleWithHttpInfo(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode);
return localVarResp.getData();
}
/**
* [EARLY ACCESS] UpdateRole: Update Role
* Updates a Role
* @param code The code of the Role (required)
* @param roleUpdateRequest The updated definition of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @param beforeScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param beforeCode Optional. The code of the Role (optional)
* @param afterScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param afterCode Optional. The code of the Role (optional)
* @return ApiResponse<RoleResponse>
* @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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse updateRoleWithHttpInfo(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode) throws ApiException {
okhttp3.Call localVarCall = updateRoleValidateBeforeCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* [EARLY ACCESS] UpdateRole: Update Role (asynchronously)
* Updates a Role
* @param code The code of the Role (required)
* @param roleUpdateRequest The updated definition of the Role (required)
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @param beforeScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param beforeCode Optional. The code of the Role (optional)
* @param afterScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @param afterCode Optional. The code of the Role (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