net.leanix.api.UserRoleDetailsApi Maven / Gradle / Ivy
package net.leanix.api;
import net.leanix.api.common.ApiException;
import net.leanix.api.common.ApiClient;
import net.leanix.api.common.Configuration;
import net.leanix.api.common.Pair;
import javax.ws.rs.core.GenericType;
import net.leanix.api.models.UserRoleDetail;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class UserRoleDetailsApi {
private ApiClient apiClient;
public UserRoleDetailsApi() {
this(Configuration.getDefaultApiClient());
}
public UserRoleDetailsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create a new UserRoleDetail
*
* @param body Message-Body (optional)
* @return UserRoleDetail
* @throws ApiException if fails to make API call
*/
public UserRoleDetail createUserRoleDetail(UserRoleDetail body) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/userRoleDetails".replaceAll("\\{format\\}","json");
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete a UserRoleDetail by a given ID
*
* @param ID Unique ID (required)
* @throws ApiException if fails to make API call
*/
public void deleteUserRoleDetail(String ID) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ID' is set
if (ID == null) {
throw new ApiException(400, "Missing the required parameter 'ID' when calling deleteUserRoleDetail");
}
// create path and map variables
String localVarPath = "/userRoleDetails/{ID}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "ID" + "\\}", apiClient.escapeString(ID.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Read a UserRoleDetail by a given ID
*
* @param ID Unique ID (required)
* @param relations If set to true, all relations of the Fact Sheet are fetched as well. Fetching all relations can be slower. Default: false. (optional, default to false)
* @return UserRoleDetail
* @throws ApiException if fails to make API call
*/
public UserRoleDetail getUserRoleDetail(String ID, Boolean relations) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ID' is set
if (ID == null) {
throw new ApiException(400, "Missing the required parameter 'ID' when calling getUserRoleDetail");
}
// create path and map variables
String localVarPath = "/userRoleDetails/{ID}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "ID" + "\\}", apiClient.escapeString(ID.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "relations", relations));
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Read all user role details
*
* @param relations If set to true, all relations of the Fact Sheet are fetched as well. Fetching all relations can be slower. Default: false. (optional, default to false)
* @return List
* @throws ApiException if fails to make API call
*/
public List getUserRoleDetails(Boolean relations) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/userRoleDetails".replaceAll("\\{format\\}","json");
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "relations", relations));
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update a UserRoleDetail by a given ID
*
* @param ID Unique ID (required)
* @param body Message-Body (optional)
* @return UserRoleDetail
* @throws ApiException if fails to make API call
*/
public UserRoleDetail updateUserRoleDetail(String ID, UserRoleDetail body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'ID' is set
if (ID == null) {
throw new ApiException(400, "Missing the required parameter 'ID' when calling updateUserRoleDetail");
}
// create path and map variables
String localVarPath = "/userRoleDetails/{ID}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "ID" + "\\}", apiClient.escapeString(ID.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy