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.AddPolicyCollectionToRoleRequest;
import com.finbourne.access.model.LusidProblemDetails;
import com.finbourne.access.model.LusidValidationProblemDetails;
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;
private int localHostIndex;
private String localCustomBaseUrl;
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;
}
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 addPolicyCollectionToRoleCall(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, final ApiCallback _callback) throws ApiException {
return addPolicyCollectionToRoleCall(scope, code, addPolicyCollectionToRoleRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call addPolicyCollectionToRoleCall(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, 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 = addPolicyCollectionToRoleRequest;
// create path and map variables
String localVarPath = "/api/roles/{scope}/{code}/policycollections"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json-patch+json",
"application/json",
"text/json",
"application/*+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call addPolicyCollectionToRoleValidateBeforeCall(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling 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)");
}
return addPolicyCollectionToRoleCall(scope, code, addPolicyCollectionToRoleRequest, _callback, opts);
}
private ApiResponse addPolicyCollectionToRoleWithHttpInfo(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest) throws ApiException {
okhttp3.Call localVarCall = addPolicyCollectionToRoleValidateBeforeCall(scope, code, addPolicyCollectionToRoleRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse addPolicyCollectionToRoleWithHttpInfo(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = addPolicyCollectionToRoleValidateBeforeCall(scope, code, addPolicyCollectionToRoleRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call addPolicyCollectionToRoleAsync(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addPolicyCollectionToRoleValidateBeforeCall(scope, code, addPolicyCollectionToRoleRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call addPolicyCollectionToRoleAsync(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = addPolicyCollectionToRoleValidateBeforeCall(scope, code, addPolicyCollectionToRoleRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIaddPolicyCollectionToRoleRequest {
private final String scope;
private final String code;
private final AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest;
private APIaddPolicyCollectionToRoleRequest(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest) {
this.scope = scope;
this.code = code;
this.addPolicyCollectionToRoleRequest = addPolicyCollectionToRoleRequest;
}
/**
* Build call for addPolicyCollectionToRole
* @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
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return addPolicyCollectionToRoleCall(scope, code, addPolicyCollectionToRoleRequest, _callback);
}
/**
* Execute addPolicyCollectionToRole request
* @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 execute() throws ApiException {
ApiResponse localVarResp = addPolicyCollectionToRoleWithHttpInfo(scope, code, addPolicyCollectionToRoleRequest);
return localVarResp.getData();
}
/**
* Execute addPolicyCollectionToRole request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = addPolicyCollectionToRoleWithHttpInfo(scope, code, addPolicyCollectionToRoleRequest, opts);
return localVarResp.getData();
}
/**
* Execute addPolicyCollectionToRole request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return addPolicyCollectionToRoleWithHttpInfo(scope, code, addPolicyCollectionToRoleRequest);
}
/**
* Execute addPolicyCollectionToRole request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return addPolicyCollectionToRoleWithHttpInfo(scope, code, addPolicyCollectionToRoleRequest, opts);
}
/**
* Execute addPolicyCollectionToRole 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
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return addPolicyCollectionToRoleAsync(scope, code, addPolicyCollectionToRoleRequest, _callback);
}
/**
* Execute addPolicyCollectionToRole 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
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return addPolicyCollectionToRoleAsync(scope, code, addPolicyCollectionToRoleRequest, _callback, opts);
}
}
/**
* 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 APIaddPolicyCollectionToRoleRequest
* @http.response.details
Status Code
Description
Response Headers
200
AddPolicyCollectionToRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIaddPolicyCollectionToRoleRequest addPolicyCollectionToRole(String scope, String code, AddPolicyCollectionToRoleRequest addPolicyCollectionToRoleRequest) {
return new APIaddPolicyCollectionToRoleRequest(scope, code, addPolicyCollectionToRoleRequest);
}
private okhttp3.Call createRoleCall(RoleCreationRequest roleCreationRequest, final ApiCallback _callback) throws ApiException {
return createRoleCall(roleCreationRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call createRoleCall(RoleCreationRequest roleCreationRequest, 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 = 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);
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 createRoleValidateBeforeCall(RoleCreationRequest roleCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'roleCreationRequest' is set
if (roleCreationRequest == null) {
throw new ApiException("Missing the required parameter 'roleCreationRequest' when calling createRole(Async)");
}
return createRoleCall(roleCreationRequest, _callback, opts);
}
private ApiResponse createRoleWithHttpInfo(RoleCreationRequest roleCreationRequest) throws ApiException {
okhttp3.Call localVarCall = createRoleValidateBeforeCall(roleCreationRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createRoleWithHttpInfo(RoleCreationRequest roleCreationRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createRoleValidateBeforeCall(roleCreationRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createRoleAsync(RoleCreationRequest roleCreationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createRoleValidateBeforeCall(roleCreationRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createRoleAsync(RoleCreationRequest roleCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createRoleValidateBeforeCall(roleCreationRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreateRoleRequest {
private final RoleCreationRequest roleCreationRequest;
private APIcreateRoleRequest(RoleCreationRequest roleCreationRequest) {
this.roleCreationRequest = roleCreationRequest;
}
/**
* Build call for createRole
* @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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return createRoleCall(roleCreationRequest, _callback);
}
/**
* Execute createRole request
* @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 execute() throws ApiException {
ApiResponse localVarResp = createRoleWithHttpInfo(roleCreationRequest);
return localVarResp.getData();
}
/**
* Execute createRole request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = createRoleWithHttpInfo(roleCreationRequest, opts);
return localVarResp.getData();
}
/**
* Execute createRole request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return createRoleWithHttpInfo(roleCreationRequest);
}
/**
* Execute createRole request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return createRoleWithHttpInfo(roleCreationRequest, opts);
}
/**
* Execute createRole 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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return createRoleAsync(roleCreationRequest, _callback);
}
/**
* Execute createRole 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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return createRoleAsync(roleCreationRequest, _callback, opts);
}
}
/**
* CreateRole: Create Role
* Creates a Role
* @param roleCreationRequest The definition of the Role (required)
* @return APIcreateRoleRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreateRoleRequest createRole(RoleCreationRequest roleCreationRequest) {
return new APIcreateRoleRequest(roleCreationRequest);
}
private okhttp3.Call deleteRoleCall(String code, String scope, final ApiCallback _callback) throws ApiException {
return deleteRoleCall(code, scope, _callback, new ConfigurationOptions());
}
private okhttp3.Call deleteRoleCall(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/roles/{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 deleteRoleValidateBeforeCall(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 deleteRole(Async)");
}
return deleteRoleCall(code, scope, _callback, opts);
}
private ApiResponse deleteRoleWithHttpInfo(String code, String scope) throws ApiException {
okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(code, scope, null, new ConfigurationOptions());
return localVarApiClient.execute(localVarCall);
}
private ApiResponse deleteRoleWithHttpInfo(String code, String scope, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(code, scope, null, opts);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deleteRoleAsync(String code, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(code, scope, _callback, new ConfigurationOptions());
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
private okhttp3.Call deleteRoleAsync(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(code, scope, _callback, opts);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public class APIdeleteRoleRequest {
private final String code;
private String scope;
private APIdeleteRoleRequest(String code) {
this.code = code;
}
/**
* Set scope
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @return APIdeleteRoleRequest
*/
public APIdeleteRoleRequest scope(String scope) {
this.scope = scope;
return this;
}
/**
* Build call for deleteRole
* @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 deleteRoleCall(code, scope, _callback);
}
/**
* Execute deleteRole 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 {
deleteRoleWithHttpInfo(code, scope);
}
/**
* Execute deleteRole 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 {
deleteRoleWithHttpInfo(code, scope, opts);
}
/**
* Execute deleteRole 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 deleteRoleWithHttpInfo(code, scope);
}
/**
* Execute deleteRole 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 deleteRoleWithHttpInfo(code, scope, opts);
}
/**
* Execute deleteRole 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 deleteRoleAsync(code, scope, _callback);
}
/**
* Execute deleteRole 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 deleteRoleAsync(code, scope, _callback, opts);
}
}
/**
* DeleteRole: Delete Role
* Deletes an identified Role
* @param code The code of the Role (required)
* @return APIdeleteRoleRequest
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIdeleteRoleRequest deleteRole(String code) {
return new APIdeleteRoleRequest(code);
}
private okhttp3.Call getRoleCall(String code, String scope, final ApiCallback _callback) throws ApiException {
return getRoleCall(code, scope, _callback, new ConfigurationOptions());
}
private okhttp3.Call getRoleCall(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/roles/{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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getRoleValidateBeforeCall(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 getRole(Async)");
}
return getRoleCall(code, scope, _callback, opts);
}
private ApiResponse getRoleWithHttpInfo(String code, String scope) throws ApiException {
okhttp3.Call localVarCall = getRoleValidateBeforeCall(code, scope, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getRoleWithHttpInfo(String code, String scope, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getRoleValidateBeforeCall(code, scope, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getRoleAsync(String code, String scope, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRoleValidateBeforeCall(code, scope, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getRoleAsync(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getRoleValidateBeforeCall(code, scope, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetRoleRequest {
private final String code;
private String scope;
private APIgetRoleRequest(String code) {
this.code = code;
}
/**
* Set scope
* @param scope Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @return APIgetRoleRequest
*/
public APIgetRoleRequest scope(String scope) {
this.scope = scope;
return this;
}
/**
* Build call for getRole
* @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
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getRoleCall(code, scope, _callback);
}
/**
* Execute getRole request
* @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 execute() throws ApiException {
ApiResponse localVarResp = getRoleWithHttpInfo(code, scope);
return localVarResp.getData();
}
/**
* Execute getRole request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getRoleWithHttpInfo(code, scope, opts);
return localVarResp.getData();
}
/**
* Execute getRole request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return getRoleWithHttpInfo(code, scope);
}
/**
* Execute getRole request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getRoleWithHttpInfo(code, scope, opts);
}
/**
* Execute getRole 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
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getRoleAsync(code, scope, _callback);
}
/**
* Execute getRole 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
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getRoleAsync(code, scope, _callback, opts);
}
}
/**
* GetRole: Get Role
* Gets an identified Role
* @param code The code of the Role (required)
* @return APIgetRoleRequest
* @http.response.details
Status Code
Description
Response Headers
200
Requested Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIgetRoleRequest getRole(String code) {
return new APIgetRoleRequest(code);
}
private okhttp3.Call listRolesCall(String scope, final ApiCallback _callback) throws ApiException {
return listRolesCall(scope, _callback, new ConfigurationOptions());
}
private okhttp3.Call listRolesCall(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/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));
}
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listRolesValidateBeforeCall(String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return listRolesCall(scope, _callback, opts);
}
private ApiResponse> listRolesWithHttpInfo(String scope) throws ApiException {
okhttp3.Call localVarCall = listRolesValidateBeforeCall(scope, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse> listRolesWithHttpInfo(String scope, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listRolesValidateBeforeCall(scope, null, opts);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listRolesAsync(String scope, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = listRolesValidateBeforeCall(scope, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call listRolesAsync(String scope, final ApiCallback> _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listRolesValidateBeforeCall(scope, _callback, opts);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistRolesRequest {
private String scope;
private APIlistRolesRequest() {
}
/**
* Set scope
* @param scope Optional. Will use all scopes if not supplied. The requested scope (optional)
* @return APIlistRolesRequest
*/
public APIlistRolesRequest scope(String scope) {
this.scope = scope;
return this;
}
/**
* Build call for listRoles
* @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
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listRolesCall(scope, _callback);
}
/**
* Execute listRoles request
* @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 execute() throws ApiException {
ApiResponse> localVarResp = listRolesWithHttpInfo(scope);
return localVarResp.getData();
}
/**
* Execute listRoles request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse> localVarResp = listRolesWithHttpInfo(scope, opts);
return localVarResp.getData();
}
/**
* Execute listRoles request with HTTP info returned
* @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> executeWithHttpInfo() throws ApiException {
return listRolesWithHttpInfo(scope);
}
/**
* Execute listRoles request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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> executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return listRolesWithHttpInfo(scope, opts);
}
/**
* Execute listRoles 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
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return listRolesAsync(scope, _callback);
}
/**
* Execute listRoles 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
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback, ConfigurationOptions opts) throws ApiException {
return listRolesAsync(scope, _callback, opts);
}
}
/**
* ListRoles: List Roles
* Gets all Roles in a scope
* @return APIlistRolesRequest
* @http.response.details
Status Code
Description
Response Headers
200
List of Roles
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIlistRolesRequest listRoles() {
return new APIlistRolesRequest();
}
private okhttp3.Call removePolicyCollectionFromRoleCall(String scope, String code, String policycollectionscope, String policycollectioncode, final ApiCallback _callback) throws ApiException {
return removePolicyCollectionFromRoleCall(scope, code, policycollectionscope, policycollectioncode, _callback, new ConfigurationOptions());
}
private okhttp3.Call removePolicyCollectionFromRoleCall(String scope, String code, String policycollectionscope, String policycollectioncode, 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/roles/{scope}/{code}/policycollections/{policycollectionscope}/{policycollectioncode}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()))
.replace("{" + "policycollectionscope" + "}", localVarApiClient.escapeString(policycollectionscope.toString()))
.replace("{" + "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);
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 removePolicyCollectionFromRoleValidateBeforeCall(String scope, String code, String policycollectionscope, String policycollectioncode, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling 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)");
}
return removePolicyCollectionFromRoleCall(scope, code, policycollectionscope, policycollectioncode, _callback, opts);
}
private ApiResponse removePolicyCollectionFromRoleWithHttpInfo(String scope, String code, String policycollectionscope, String policycollectioncode) throws ApiException {
okhttp3.Call localVarCall = removePolicyCollectionFromRoleValidateBeforeCall(scope, code, policycollectionscope, policycollectioncode, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse removePolicyCollectionFromRoleWithHttpInfo(String scope, String code, String policycollectionscope, String policycollectioncode, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = removePolicyCollectionFromRoleValidateBeforeCall(scope, code, policycollectionscope, policycollectioncode, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private 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, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call removePolicyCollectionFromRoleAsync(String scope, String code, String policycollectionscope, String policycollectioncode, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = removePolicyCollectionFromRoleValidateBeforeCall(scope, code, policycollectionscope, policycollectioncode, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIremovePolicyCollectionFromRoleRequest {
private final String scope;
private final String code;
private final String policycollectionscope;
private final String policycollectioncode;
private APIremovePolicyCollectionFromRoleRequest(String scope, String code, String policycollectionscope, String policycollectioncode) {
this.scope = scope;
this.code = code;
this.policycollectionscope = policycollectionscope;
this.policycollectioncode = policycollectioncode;
}
/**
* Build call for removePolicyCollectionFromRole
* @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
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return removePolicyCollectionFromRoleCall(scope, code, policycollectionscope, policycollectioncode, _callback);
}
/**
* Execute removePolicyCollectionFromRole request
* @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 execute() throws ApiException {
ApiResponse localVarResp = removePolicyCollectionFromRoleWithHttpInfo(scope, code, policycollectionscope, policycollectioncode);
return localVarResp.getData();
}
/**
* Execute removePolicyCollectionFromRole request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = removePolicyCollectionFromRoleWithHttpInfo(scope, code, policycollectionscope, policycollectioncode, opts);
return localVarResp.getData();
}
/**
* Execute removePolicyCollectionFromRole request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return removePolicyCollectionFromRoleWithHttpInfo(scope, code, policycollectionscope, policycollectioncode);
}
/**
* Execute removePolicyCollectionFromRole request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return removePolicyCollectionFromRoleWithHttpInfo(scope, code, policycollectionscope, policycollectioncode, opts);
}
/**
* Execute removePolicyCollectionFromRole 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
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return removePolicyCollectionFromRoleAsync(scope, code, policycollectionscope, policycollectioncode, _callback);
}
/**
* Execute removePolicyCollectionFromRole 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
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return removePolicyCollectionFromRoleAsync(scope, code, policycollectionscope, policycollectioncode, _callback, opts);
}
}
/**
* 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 APIremovePolicyCollectionFromRoleRequest
* @http.response.details
Status Code
Description
Response Headers
200
RemovePolicyCollectionFromRole
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIremovePolicyCollectionFromRoleRequest removePolicyCollectionFromRole(String scope, String code, String policycollectionscope, String policycollectioncode) {
return new APIremovePolicyCollectionFromRoleRequest(scope, code, policycollectionscope, policycollectioncode);
}
private okhttp3.Call updateRoleCall(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, final ApiCallback _callback) throws ApiException {
return updateRoleCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback, new ConfigurationOptions());
}
private okhttp3.Call updateRoleCall(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, 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 = roleUpdateRequest;
// create path and map variables
String localVarPath = "/api/roles/{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));
}
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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateRoleValidateBeforeCall(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, 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 updateRole(Async)");
}
// verify the required parameter 'roleUpdateRequest' is set
if (roleUpdateRequest == null) {
throw new ApiException("Missing the required parameter 'roleUpdateRequest' when calling updateRole(Async)");
}
return updateRoleCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback, opts);
}
private 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, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse updateRoleWithHttpInfo(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateRoleValidateBeforeCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call updateRoleAsync(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateRoleValidateBeforeCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call updateRoleAsync(String code, RoleUpdateRequest roleUpdateRequest, String scope, String beforeScope, String beforeCode, String afterScope, String afterCode, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateRoleValidateBeforeCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIupdateRoleRequest {
private final String code;
private final RoleUpdateRequest roleUpdateRequest;
private String scope;
private String beforeScope;
private String beforeCode;
private String afterScope;
private String afterCode;
private APIupdateRoleRequest(String code, RoleUpdateRequest roleUpdateRequest) {
this.code = code;
this.roleUpdateRequest = roleUpdateRequest;
}
/**
* Set scope
* @param scope >Optional. Will use default scope if not supplied. The scope of the Role (optional)
* @return APIupdateRoleRequest
*/
public APIupdateRoleRequest scope(String scope) {
this.scope = scope;
return this;
}
/**
* Set beforeScope
* @param beforeScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @return APIupdateRoleRequest
*/
public APIupdateRoleRequest beforeScope(String beforeScope) {
this.beforeScope = beforeScope;
return this;
}
/**
* Set beforeCode
* @param beforeCode Optional. The code of the Role (optional)
* @return APIupdateRoleRequest
*/
public APIupdateRoleRequest beforeCode(String beforeCode) {
this.beforeCode = beforeCode;
return this;
}
/**
* Set afterScope
* @param afterScope Optional. The scope of the Role. Will use default scope if not supplied. (optional)
* @return APIupdateRoleRequest
*/
public APIupdateRoleRequest afterScope(String afterScope) {
this.afterScope = afterScope;
return this;
}
/**
* Set afterCode
* @param afterCode Optional. The code of the Role (optional)
* @return APIupdateRoleRequest
*/
public APIupdateRoleRequest afterCode(String afterCode) {
this.afterCode = afterCode;
return this;
}
/**
* Build call for updateRole
* @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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return updateRoleCall(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback);
}
/**
* Execute updateRole request
* @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 execute() throws ApiException {
ApiResponse localVarResp = updateRoleWithHttpInfo(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode);
return localVarResp.getData();
}
/**
* Execute updateRole request. Use any specified configuration options to override any other configuration for this request only.
* @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 execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = updateRoleWithHttpInfo(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, opts);
return localVarResp.getData();
}
/**
* Execute updateRole request with HTTP info returned
* @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 executeWithHttpInfo() throws ApiException {
return updateRoleWithHttpInfo(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode);
}
/**
* Execute updateRole request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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 executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return updateRoleWithHttpInfo(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, opts);
}
/**
* Execute updateRole 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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return updateRoleAsync(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback);
}
/**
* Execute updateRole 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 Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return updateRoleAsync(code, roleUpdateRequest, scope, beforeScope, beforeCode, afterScope, afterCode, _callback, opts);
}
}
/**
* UpdateRole: Update Role
* Updates a Role
* @param code The code of the Role (required)
* @param roleUpdateRequest The updated definition of the Role (required)
* @return APIupdateRoleRequest
* @http.response.details
Status Code
Description
Response Headers
200
Updated Role
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIupdateRoleRequest updateRole(String code, RoleUpdateRequest roleUpdateRequest) {
return new APIupdateRoleRequest(code, roleUpdateRequest);
}
}