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
*
* 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.finbourne.access.extensions.ConfigurationOptions;
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 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;
private int localHostIndex;
private String localCustomBaseUrl;
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;
}
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 addToPolicyCollectionCall(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, final ApiCallback _callback) throws ApiException {
return addToPolicyCollectionCall(code, addToPolicyCollectionRequest, scope, _callback, new ConfigurationOptions());
}
private okhttp3.Call addToPolicyCollectionCall(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, 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 = addToPolicyCollectionRequest;
// create path and map variables
String localVarPath = "/api/policycollections/{code}/add"
.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 (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);
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 addToPolicyCollectionValidateBeforeCall(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, final ApiCallback _callback, ConfigurationOptions opts) 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)");
}
return addToPolicyCollectionCall(code, addToPolicyCollectionRequest, scope, _callback, opts);
}
private ApiResponse addToPolicyCollectionWithHttpInfo(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope) throws ApiException {
okhttp3.Call localVarCall = addToPolicyCollectionValidateBeforeCall(code, addToPolicyCollectionRequest, scope, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse addToPolicyCollectionWithHttpInfo(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = addToPolicyCollectionValidateBeforeCall(code, addToPolicyCollectionRequest, scope, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call addToPolicyCollectionAsync(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addToPolicyCollectionValidateBeforeCall(code, addToPolicyCollectionRequest, scope, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call addToPolicyCollectionAsync(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = addToPolicyCollectionValidateBeforeCall(code, addToPolicyCollectionRequest, scope, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIaddToPolicyCollectionRequest {
private final String code;
private final AddToPolicyCollectionRequest addToPolicyCollectionRequest;
private String scope;
private APIaddToPolicyCollectionRequest(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest) {
this.code = code;
this.addToPolicyCollectionRequest = addToPolicyCollectionRequest;
}
/**
* Set scope
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @return APIaddToPolicyCollectionRequest
*/
public APIaddToPolicyCollectionRequest scope(String scope) {
this.scope = scope;
return this;
}
/**
* Build call for addToPolicyCollection
* @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
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return addToPolicyCollectionCall(code, addToPolicyCollectionRequest, scope, _callback);
}
/**
* Execute addToPolicyCollection request
* @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 execute() throws ApiException {
ApiResponse localVarResp = addToPolicyCollectionWithHttpInfo(code, addToPolicyCollectionRequest, scope);
return localVarResp.getData();
}
/**
* Execute addToPolicyCollection request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = addToPolicyCollectionWithHttpInfo(code, addToPolicyCollectionRequest, scope, opts);
return localVarResp.getData();
}
/**
* Execute addToPolicyCollection request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return addToPolicyCollectionWithHttpInfo(code, addToPolicyCollectionRequest, scope);
}
/**
* Execute addToPolicyCollection request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return addToPolicyCollectionWithHttpInfo(code, addToPolicyCollectionRequest, scope, opts);
}
/**
* Execute addToPolicyCollection 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
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return addToPolicyCollectionAsync(code, addToPolicyCollectionRequest, scope, _callback);
}
/**
* Execute addToPolicyCollection 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
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return addToPolicyCollectionAsync(code, addToPolicyCollectionRequest, scope, _callback, opts);
}
}
/**
* 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)
* @return APIaddToPolicyCollectionRequest
* @http.response.details
Status Code
Description
Response Headers
200
Updated PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIaddToPolicyCollectionRequest addToPolicyCollection(String code, AddToPolicyCollectionRequest addToPolicyCollectionRequest) {
return new APIaddToPolicyCollectionRequest(code, addToPolicyCollectionRequest);
}
private okhttp3.Call createPolicyCall(PolicyCreationRequest policyCreationRequest, final ApiCallback _callback) throws ApiException {
return createPolicyCall(policyCreationRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call createPolicyCall(PolicyCreationRequest policyCreationRequest, 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 = 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);
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 createPolicyValidateBeforeCall(PolicyCreationRequest policyCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'policyCreationRequest' is set
if (policyCreationRequest == null) {
throw new ApiException("Missing the required parameter 'policyCreationRequest' when calling createPolicy(Async)");
}
return createPolicyCall(policyCreationRequest, _callback, opts);
}
private ApiResponse createPolicyWithHttpInfo(PolicyCreationRequest policyCreationRequest) throws ApiException {
okhttp3.Call localVarCall = createPolicyValidateBeforeCall(policyCreationRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createPolicyWithHttpInfo(PolicyCreationRequest policyCreationRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createPolicyValidateBeforeCall(policyCreationRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createPolicyAsync(PolicyCreationRequest policyCreationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createPolicyValidateBeforeCall(policyCreationRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createPolicyAsync(PolicyCreationRequest policyCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createPolicyValidateBeforeCall(policyCreationRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreatePolicyRequest {
private final PolicyCreationRequest policyCreationRequest;
private APIcreatePolicyRequest(PolicyCreationRequest policyCreationRequest) {
this.policyCreationRequest = policyCreationRequest;
}
/**
* Build call for createPolicy
* @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 policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return createPolicyCall(policyCreationRequest, _callback);
}
/**
* Execute createPolicy request
* @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 execute() throws ApiException {
ApiResponse localVarResp = createPolicyWithHttpInfo(policyCreationRequest);
return localVarResp.getData();
}
/**
* Execute createPolicy request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = createPolicyWithHttpInfo(policyCreationRequest, opts);
return localVarResp.getData();
}
/**
* Execute createPolicy request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return createPolicyWithHttpInfo(policyCreationRequest);
}
/**
* Execute createPolicy request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return createPolicyWithHttpInfo(policyCreationRequest, opts);
}
/**
* Execute createPolicy 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 policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return createPolicyAsync(policyCreationRequest, _callback);
}
/**
* Execute createPolicy 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 policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return createPolicyAsync(policyCreationRequest, _callback, opts);
}
}
/**
* CreatePolicy: Create Policy
* Creates a Policy
* @param policyCreationRequest The definition of the Policy (required)
* @return APIcreatePolicyRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created policy
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreatePolicyRequest createPolicy(PolicyCreationRequest policyCreationRequest) {
return new APIcreatePolicyRequest(policyCreationRequest);
}
private okhttp3.Call createPolicyCollectionCall(PolicyCollectionCreationRequest policyCollectionCreationRequest, final ApiCallback _callback) throws ApiException {
return createPolicyCollectionCall(policyCollectionCreationRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call createPolicyCollectionCall(PolicyCollectionCreationRequest policyCollectionCreationRequest, 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 = 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);
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 createPolicyCollectionValidateBeforeCall(PolicyCollectionCreationRequest policyCollectionCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'policyCollectionCreationRequest' is set
if (policyCollectionCreationRequest == null) {
throw new ApiException("Missing the required parameter 'policyCollectionCreationRequest' when calling createPolicyCollection(Async)");
}
return createPolicyCollectionCall(policyCollectionCreationRequest, _callback, opts);
}
private ApiResponse createPolicyCollectionWithHttpInfo(PolicyCollectionCreationRequest policyCollectionCreationRequest) throws ApiException {
okhttp3.Call localVarCall = createPolicyCollectionValidateBeforeCall(policyCollectionCreationRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createPolicyCollectionWithHttpInfo(PolicyCollectionCreationRequest policyCollectionCreationRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createPolicyCollectionValidateBeforeCall(policyCollectionCreationRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createPolicyCollectionAsync(PolicyCollectionCreationRequest policyCollectionCreationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createPolicyCollectionValidateBeforeCall(policyCollectionCreationRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createPolicyCollectionAsync(PolicyCollectionCreationRequest policyCollectionCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createPolicyCollectionValidateBeforeCall(policyCollectionCreationRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreatePolicyCollectionRequest {
private final PolicyCollectionCreationRequest policyCollectionCreationRequest;
private APIcreatePolicyCollectionRequest(PolicyCollectionCreationRequest policyCollectionCreationRequest) {
this.policyCollectionCreationRequest = policyCollectionCreationRequest;
}
/**
* Build call for createPolicyCollection
* @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 PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return createPolicyCollectionCall(policyCollectionCreationRequest, _callback);
}
/**
* Execute createPolicyCollection request
* @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 execute() throws ApiException {
ApiResponse localVarResp = createPolicyCollectionWithHttpInfo(policyCollectionCreationRequest);
return localVarResp.getData();
}
/**
* Execute createPolicyCollection request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = createPolicyCollectionWithHttpInfo(policyCollectionCreationRequest, opts);
return localVarResp.getData();
}
/**
* Execute createPolicyCollection request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return createPolicyCollectionWithHttpInfo(policyCollectionCreationRequest);
}
/**
* Execute createPolicyCollection request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return createPolicyCollectionWithHttpInfo(policyCollectionCreationRequest, opts);
}
/**
* Execute createPolicyCollection 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 PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return createPolicyCollectionAsync(policyCollectionCreationRequest, _callback);
}
/**
* Execute createPolicyCollection 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 PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return createPolicyCollectionAsync(policyCollectionCreationRequest, _callback, opts);
}
}
/**
* CreatePolicyCollection: Create PolicyCollection
* Creates a PolicyCollection
* @param policyCollectionCreationRequest The definition of the PolicyCollection (required)
* @return APIcreatePolicyCollectionRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created PolicyCollection
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreatePolicyCollectionRequest createPolicyCollection(PolicyCollectionCreationRequest policyCollectionCreationRequest) {
return new APIcreatePolicyCollectionRequest(policyCollectionCreationRequest);
}
private okhttp3.Call deletePolicyCall(String code, String scope, final ApiCallback _callback) throws ApiException {
return deletePolicyCall(code, scope, _callback, new ConfigurationOptions());
}
private okhttp3.Call deletePolicyCall(String code, String scope, 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/policies/{code}"
.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 (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);
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 deletePolicyValidateBeforeCall(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling deletePolicy(Async)");
}
return deletePolicyCall(code, scope, _callback, opts);
}
private ApiResponse deletePolicyWithHttpInfo(String code, String scope) throws ApiException {
okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(code, scope, null, new ConfigurationOptions());
return localVarApiClient.execute(localVarCall);
}
private ApiResponse deletePolicyWithHttpInfo(String code, String scope, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(code, scope, null, opts);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deletePolicyAsync(String code, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(code, scope, _callback, new ConfigurationOptions());
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
private okhttp3.Call deletePolicyAsync(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deletePolicyValidateBeforeCall(code, scope, _callback, opts);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public class APIdeletePolicyRequest {
private final String code;
private String scope;
private APIdeletePolicyRequest(String code) {
this.code = code;
}
/**
* Set scope
* @param scope Optional. Will use the default scope if not provided. The scope of the Policy (optional)
* @return APIdeletePolicyRequest
*/
public APIdeletePolicyRequest scope(String scope) {
this.scope = scope;
return this;
}
/**
* Build call for deletePolicy
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return deletePolicyCall(code, scope, _callback);
}
/**
* Execute deletePolicy request
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public void execute() throws ApiException {
deletePolicyWithHttpInfo(code, scope);
}
/**
* Execute deletePolicy request
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public void execute(ConfigurationOptions opts) throws ApiException {
deletePolicyWithHttpInfo(code, scope, opts);
}
/**
* Execute deletePolicy request with HTTP info returned
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return deletePolicyWithHttpInfo(code, scope);
}
/**
* Execute deletePolicy request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return deletePolicyWithHttpInfo(code, scope, opts);
}
/**
* Execute deletePolicy request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return deletePolicyAsync(code, scope, _callback);
}
/**
* Execute deletePolicy request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return deletePolicyAsync(code, scope, _callback, opts);
}
}
/**
* DeletePolicy: Delete Policy
* Deletes an identified Policy
* @param code The code of the Policy (required)
* @return APIdeletePolicyRequest
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIdeletePolicyRequest deletePolicy(String code) {
return new APIdeletePolicyRequest(code);
}
private okhttp3.Call deletePolicyCollectionCall(String code, String scope, final ApiCallback _callback) throws ApiException {
return deletePolicyCollectionCall(code, scope, _callback, new ConfigurationOptions());
}
private okhttp3.Call deletePolicyCollectionCall(String code, String scope, 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/policycollections/{code}"
.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 (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);
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 deletePolicyCollectionValidateBeforeCall(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling deletePolicyCollection(Async)");
}
return deletePolicyCollectionCall(code, scope, _callback, opts);
}
private ApiResponse deletePolicyCollectionWithHttpInfo(String code, String scope) throws ApiException {
okhttp3.Call localVarCall = deletePolicyCollectionValidateBeforeCall(code, scope, null, new ConfigurationOptions());
return localVarApiClient.execute(localVarCall);
}
private ApiResponse deletePolicyCollectionWithHttpInfo(String code, String scope, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deletePolicyCollectionValidateBeforeCall(code, scope, null, opts);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deletePolicyCollectionAsync(String code, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deletePolicyCollectionValidateBeforeCall(code, scope, _callback, new ConfigurationOptions());
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
private okhttp3.Call deletePolicyCollectionAsync(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deletePolicyCollectionValidateBeforeCall(code, scope, _callback, opts);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public class APIdeletePolicyCollectionRequest {
private final String code;
private String scope;
private APIdeletePolicyCollectionRequest(String code) {
this.code = code;
}
/**
* Set scope
* @param scope Optional. Will use the default scope if not provided. The scope of the PolicyCollection (optional)
* @return APIdeletePolicyCollectionRequest
*/
public APIdeletePolicyCollectionRequest scope(String scope) {
this.scope = scope;
return this;
}
/**
* Build call for deletePolicyCollection
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return deletePolicyCollectionCall(code, scope, _callback);
}
/**
* Execute deletePolicyCollection request
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public void execute() throws ApiException {
deletePolicyCollectionWithHttpInfo(code, scope);
}
/**
* Execute deletePolicyCollection request
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public void execute(ConfigurationOptions opts) throws ApiException {
deletePolicyCollectionWithHttpInfo(code, scope, opts);
}
/**
* Execute deletePolicyCollection request with HTTP info returned
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return deletePolicyCollectionWithHttpInfo(code, scope);
}
/**
* Execute deletePolicyCollection request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return deletePolicyCollectionWithHttpInfo(code, scope, opts);
}
/**
* Execute deletePolicyCollection request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return deletePolicyCollectionAsync(code, scope, _callback);
}
/**
* Execute deletePolicyCollection request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return deletePolicyCollectionAsync(code, scope, _callback, opts);
}
}
/**
* DeletePolicyCollection: Delete PolicyCollection
* Deletes an identified PolicyCollection
* @param code The code of the PolicyCollection (required)
* @return APIdeletePolicyCollectionRequest
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIdeletePolicyCollectionRequest deletePolicyCollection(String code) {
return new APIdeletePolicyCollectionRequest(code);
}
private okhttp3.Call evaluateCall(Map requestBody, List applications, final ApiCallback _callback) throws ApiException {
return evaluateCall(requestBody, applications, _callback, new ConfigurationOptions());
}
private okhttp3.Call evaluateCall(Map requestBody, List applications, 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 = 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));
}
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 evaluateValidateBeforeCall(Map requestBody, List applications, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling evaluate(Async)");
}
return evaluateCall(requestBody, applications, _callback, opts);
}
private ApiResponse