com.unblu.webapi.jersey.v3.api.TeamsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jersey-client-v3 Show documentation
Show all versions of jersey-client-v3 Show documentation
Client implemented using Jersey
package com.unblu.webapi.jersey.v3.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import com.unblu.webapi.jersey.v3.invoker.ApiClient;
import com.unblu.webapi.jersey.v3.invoker.ApiException;
import com.unblu.webapi.jersey.v3.invoker.ApiResponse;
import com.unblu.webapi.jersey.v3.invoker.Configuration;
import com.unblu.webapi.jersey.v3.invoker.Pair;
import com.unblu.webapi.model.v3.Team;
import com.unblu.webapi.model.v3.TeamQuery;
import com.unblu.webapi.model.v3.TeamResult;
public class TeamsApi {
private ApiClient apiClient;
public TeamsApi() {
this(Configuration.getDefaultApiClient());
}
public TeamsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* create Creates the given entity in the system. The ID of the entity is ignored for create operations, a new one is generated.<br>
*
* @param team The entity to create (required)
* @param expand (optional)
* @return Team
* @throws ApiException if fails to make API call
*/
public Team teamsCreate(Team team, String expand) throws ApiException {
return teamsCreateWithHttpInfo(team, expand).getData();
}
/**
* create Creates the given entity in the system. The ID of the entity is ignored for create operations, a new one is generated.<br>
*
* @param team The entity to create (required)
* @param expand (optional)
* @return ApiResponse<Team>
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsCreateWithHttpInfo(Team team, String expand) throws ApiException {
Object localVarPostBody = team;
// verify the required parameter 'team' is set
if (team == null) {
throw new ApiException(400, "Missing the required parameter 'team' when calling teamsCreate");
}
// create path and map variables
String localVarPath = "/teams/create";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* delete Deletes the entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
*/
public void teamsDelete(String id) throws ApiException {
teamsDeleteWithHttpInfo(id);
}
/**
* delete Deletes the entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsDeleteWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/delete";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* delete Deletes the entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
* @deprecated
*/
@Deprecated
public void teamsDeleteLegacyGet(String id) throws ApiException {
teamsDeleteLegacyGetWithHttpInfo(id);
}
/**
* delete Deletes the entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
* @deprecated
*/
@Deprecated
public ApiResponse teamsDeleteLegacyGetWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/delete";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* getByParentId Returns a list of teams, which directly belong to the given parent team.<br>
*
* @param parentId The ID of the parent for which the direct child teams should be returned (optional)
* @param expand (optional)
* @return List<Team>
* @throws ApiException if fails to make API call
*/
public List teamsGetByParentId(String parentId, String expand) throws ApiException {
return teamsGetByParentIdWithHttpInfo(parentId, expand).getData();
}
/**
* getByParentId Returns a list of teams, which directly belong to the given parent team.<br>
*
* @param parentId The ID of the parent for which the direct child teams should be returned (optional)
* @param expand (optional)
* @return ApiResponse<List<Team>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> teamsGetByParentIdWithHttpInfo(String parentId, String expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/getByParentId";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "parentId", parentId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType> localVarReturnType = new GenericType>() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* getChildTeamIds Returns a list of teams ids, which recursively belong to the given parent team. So child teams of a child team are also listed<br>
*
* @param teamId The ID of the parent team for which the child teams should be returned recursively (optional)
* @return List<String>
* @throws ApiException if fails to make API call
*/
public List teamsGetChildTeamIds(String teamId) throws ApiException {
return teamsGetChildTeamIdsWithHttpInfo(teamId).getData();
}
/**
* getChildTeamIds Returns a list of teams ids, which recursively belong to the given parent team. So child teams of a child team are also listed<br>
*
* @param teamId The ID of the parent team for which the child teams should be returned recursively (optional)
* @return ApiResponse<List<String>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> teamsGetChildTeamIdsWithHttpInfo(String teamId) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/getChildTeamIds";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "teamId", teamId));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType> localVarReturnType = new GenericType>() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* getChildTeams Returns a list of teams, which recursively belong to the given parent team. So child teams of a child team are also listed<br>
*
* @param teamId The ID of the parent team for which the child teams should be returned recursively (optional)
* @param expand (optional)
* @return List<Team>
* @throws ApiException if fails to make API call
*/
public List teamsGetChildTeams(String teamId, String expand) throws ApiException {
return teamsGetChildTeamsWithHttpInfo(teamId, expand).getData();
}
/**
* getChildTeams Returns a list of teams, which recursively belong to the given parent team. So child teams of a child team are also listed<br>
*
* @param teamId The ID of the parent team for which the child teams should be returned recursively (optional)
* @param expand (optional)
* @return ApiResponse<List<Team>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> teamsGetChildTeamsWithHttpInfo(String teamId, String expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/getChildTeams";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "teamId", teamId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType> localVarReturnType = new GenericType>() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* getQuotaUsage Returns the number of entities already existing (for the current account)<br>
*
* @return Integer
* @throws ApiException if fails to make API call
*/
public Integer teamsGetQuotaUsage() throws ApiException {
return teamsGetQuotaUsageWithHttpInfo().getData();
}
/**
* getQuotaUsage Returns the number of entities already existing (for the current account)<br>
*
* @return ApiResponse<Integer>
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsGetQuotaUsageWithHttpInfo() throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/getQuotaUsage";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* getTeamOfCurrentUser Returns the team of the current logged in user. There is always a team, at least the default team.<br>
*
* @param expand (optional)
* @return Team
* @throws ApiException if fails to make API call
*/
public Team teamsGetTeamOfCurrentUser(String expand) throws ApiException {
return teamsGetTeamOfCurrentUserWithHttpInfo(expand).getData();
}
/**
* getTeamOfCurrentUser Returns the team of the current logged in user. There is always a team, at least the default team.<br>
*
* @param expand (optional)
* @return ApiResponse<Team>
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsGetTeamOfCurrentUserWithHttpInfo(String expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/getTeamOfCurrentUser";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* read Returns the team for the given ID<br>
*
* @param id ID of the team which should be returned (optional)
* @param expand (optional)
* @return Team
* @throws ApiException if fails to make API call
*/
public Team teamsRead(String id, String expand) throws ApiException {
return teamsReadWithHttpInfo(id, expand).getData();
}
/**
* read Returns the team for the given ID<br>
*
* @param id ID of the team which should be returned (optional)
* @param expand (optional)
* @return ApiResponse<Team>
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsReadWithHttpInfo(String id, String expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/read";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* readMultiple Gets a list of teams for the given ID's<br>
*
* @param requestBody The ID's for which the teams should be fetched (required)
* @param expand (optional)
* @return List<Team>
* @throws ApiException if fails to make API call
*/
public List teamsReadMultiple(List requestBody, String expand) throws ApiException {
return teamsReadMultipleWithHttpInfo(requestBody, expand).getData();
}
/**
* readMultiple Gets a list of teams for the given ID's<br>
*
* @param requestBody The ID's for which the teams should be fetched (required)
* @param expand (optional)
* @return ApiResponse<List<Team>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> teamsReadMultipleWithHttpInfo(List requestBody, String expand) throws ApiException {
Object localVarPostBody = requestBody;
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling teamsReadMultiple");
}
// create path and map variables
String localVarPath = "/teams/readMultiple";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType> localVarReturnType = new GenericType>() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* search Search for teams in the current account<br>
*
* @param teamQuery (required)
* @param expand (optional)
* @return TeamResult
* @throws ApiException if fails to make API call
*/
public TeamResult teamsSearch(TeamQuery teamQuery, String expand) throws ApiException {
return teamsSearchWithHttpInfo(teamQuery, expand).getData();
}
/**
* search Search for teams in the current account<br>
*
* @param teamQuery (required)
* @param expand (optional)
* @return ApiResponse<TeamResult>
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsSearchWithHttpInfo(TeamQuery teamQuery, String expand) throws ApiException {
Object localVarPostBody = teamQuery;
// verify the required parameter 'teamQuery' is set
if (teamQuery == null) {
throw new ApiException(400, "Missing the required parameter 'teamQuery' when calling teamsSearch");
}
// create path and map variables
String localVarPath = "/teams/search";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* teamIsChildOfOtherTeam Checks if the subTeamId is a child team of the parentTeamId.<br> If isParentTeamItselfAllowed is true, this functions returns
* true if subTeamId is equals parentTeamId.<br> This check is recursive. It will check all parent teams of the sub team until it either finds the given
* parent team or if there is no parent team anymore.<br>
*
* @param parentTeamId The parent team id against which the check should be done (optional)
* @param subTeamId The sub team id, which is checked against the parent team id (optional)
* @return Boolean
* @throws ApiException if fails to make API call
*/
public Boolean teamsTeamIsChildOfOtherTeam(String parentTeamId, String subTeamId) throws ApiException {
return teamsTeamIsChildOfOtherTeamWithHttpInfo(parentTeamId, subTeamId).getData();
}
/**
* teamIsChildOfOtherTeam Checks if the subTeamId is a child team of the parentTeamId.<br> If isParentTeamItselfAllowed is true, this functions returns
* true if subTeamId is equals parentTeamId.<br> This check is recursive. It will check all parent teams of the sub team until it either finds the given
* parent team or if there is no parent team anymore.<br>
*
* @param parentTeamId The parent team id against which the check should be done (optional)
* @param subTeamId The sub team id, which is checked against the parent team id (optional)
* @return ApiResponse<Boolean>
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsTeamIsChildOfOtherTeamWithHttpInfo(String parentTeamId, String subTeamId) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/teams/teamIsChildOfOtherTeam";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "parentTeamId", parentTeamId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "subTeamId", subTeamId));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* update Updates the team entity with the given instance. A supervisor can change his team and all sub teams<br>
*
* @param team The entity to update (required)
* @param expand (optional)
* @return Team
* @throws ApiException if fails to make API call
*/
public Team teamsUpdate(Team team, String expand) throws ApiException {
return teamsUpdateWithHttpInfo(team, expand).getData();
}
/**
* update Updates the team entity with the given instance. A supervisor can change his team and all sub teams<br>
*
* @param team The entity to update (required)
* @param expand (optional)
* @return ApiResponse<Team>
* @throws ApiException if fails to make API call
*/
public ApiResponse teamsUpdateWithHttpInfo(Team team, String expand) throws ApiException {
Object localVarPostBody = team;
// verify the required parameter 'team' is set
if (team == null) {
throw new ApiException(400, "Missing the required parameter 'team' when calling teamsUpdate");
}
// create path and map variables
String localVarPath = "/teams/update";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}