com.mypurecloud.sdk.api.UsersApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-client Show documentation
Show all versions of platform-client Show documentation
The official Java SDK for the PureCloud Platform API SDK
The newest version!
package com.mypurecloud.sdk.api;
import com.fasterxml.jackson.core.type.TypeReference;
import com.mypurecloud.sdk.ApiException;
import com.mypurecloud.sdk.ApiClient;
import com.mypurecloud.sdk.ApiResponse;
import com.mypurecloud.sdk.Configuration;
import com.mypurecloud.sdk.model.*;
import com.mypurecloud.sdk.Pair;
import com.mypurecloud.sdk.model.Empty;
import com.mypurecloud.sdk.model.ErrorBody;
import com.mypurecloud.sdk.model.FieldConfig;
import com.mypurecloud.sdk.model.UserMe;
import com.mypurecloud.sdk.model.UsersSearchResponse;
import com.mypurecloud.sdk.model.User;
import com.mypurecloud.sdk.model.Adjacents;
import com.mypurecloud.sdk.model.CallForwarding;
import com.mypurecloud.sdk.model.UserEntityListing;
import com.mypurecloud.sdk.model.Geolocation;
import com.mypurecloud.sdk.model.OutOfOffice;
import com.mypurecloud.sdk.model.UserQueueEntityListing;
import com.mypurecloud.sdk.model.UserAuthorization;
import com.mypurecloud.sdk.model.UserSkillEntityListing;
import com.mypurecloud.sdk.model.RoutingStatus;
import com.mypurecloud.sdk.model.UserStations;
import com.mypurecloud.sdk.model.UserQueue;
import com.mypurecloud.sdk.model.UserSearchRequest;
import com.mypurecloud.sdk.model.UserRoutingSkillPost;
import com.mypurecloud.sdk.model.UserRoutingSkill;
import com.mypurecloud.sdk.model.CreateUser;
import com.mypurecloud.sdk.model.AggregationQuery;
import com.mypurecloud.sdk.model.PresenceQueryResponse;
import com.mypurecloud.sdk.model.AnalyticsUserDetailsQueryResponse;
import com.mypurecloud.sdk.model.UserDetailsQuery;
import com.mypurecloud.sdk.model.ObservationQueryResponse;
import com.mypurecloud.sdk.model.ObservationQuery;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class UsersApi {
private ApiClient pcapiClient;
public UsersApi() {
this(Configuration.getDefaultApiClient());
}
public UsersApi(ApiClient apiClient) {
this.pcapiClient = apiClient;
}
public ApiClient getApiClient() {
return pcapiClient;
}
public void setApiClient(ApiClient apiClient) {
this.pcapiClient = apiClient;
}
/**
* Delete user
*
* @param userId User ID (required)
* @return Empty
* @throws ApiException if fails to make API call
*/
public Empty deleteUserId(String userId) throws ApiException {
return deleteUserIdWithHttpInfo(userId).getResponseObject();
}
/**
* Delete user
*
* @param userId User ID (required)
* @return Empty
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteUserIdWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling deleteUserId");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Removes all the roles from the user.
*
* @param userId User ID (required)
* @throws ApiException if fails to make API call
*/
public void deleteUserIdRoles(String userId) throws ApiException {
deleteUserIdRolesWithHttpInfo(userId);
}
/**
* Removes all the roles from the user.
*
* @param userId User ID (required)
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteUserIdRolesWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling deleteUserIdRoles");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/roles".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, null);
}
/**
* Remove routing skill from user
*
* @param userId User ID (required)
* @param skillId skillId (required)
* @return String
* @throws ApiException if fails to make API call
*/
public String deleteUserIdRoutingskillsSkillId(String userId, String skillId) throws ApiException {
return deleteUserIdRoutingskillsSkillIdWithHttpInfo(userId, skillId).getResponseObject();
}
/**
* Remove routing skill from user
*
* @param userId User ID (required)
* @param skillId skillId (required)
* @return String
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteUserIdRoutingskillsSkillIdWithHttpInfo(String userId, String skillId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling deleteUserIdRoutingskillsSkillId");
}
// verify the required parameter 'skillId' is set
if (skillId == null) {
throw new ApiException(400, "Missing the required parameter 'skillId' when calling deleteUserIdRoutingskillsSkillId");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/routingskills/{skillId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()))
.replaceAll("\\{" + "skillId" + "\\}", pcapiClient.escapeString(skillId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Clear associated station
*
* @param userId User ID (required)
* @throws ApiException if fails to make API call
*/
public void deleteUserIdStationAssociatedstation(String userId) throws ApiException {
deleteUserIdStationAssociatedstationWithHttpInfo(userId);
}
/**
* Clear associated station
*
* @param userId User ID (required)
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteUserIdStationAssociatedstationWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling deleteUserIdStationAssociatedstation");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/station/associatedstation".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, null);
}
/**
* Clear default station
*
* @param userId User ID (required)
* @throws ApiException if fails to make API call
*/
public void deleteUserIdStationDefaultstation(String userId) throws ApiException {
deleteUserIdStationDefaultstationWithHttpInfo(userId);
}
/**
* Clear default station
*
* @param userId User ID (required)
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteUserIdStationDefaultstationWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling deleteUserIdStationDefaultstation");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/station/defaultstation".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, null);
}
/**
* Fetch field config for an entity type
*
* @param type Field type (required)
* @return FieldConfig
* @throws ApiException if fails to make API call
*/
public FieldConfig getFieldconfig(String type) throws ApiException {
return getFieldconfigWithHttpInfo(type).getResponseObject();
}
/**
* Fetch field config for an entity type
*
* @param type Field type (required)
* @return FieldConfig
* @throws ApiException if fails to make API call
*/
public ApiResponse getFieldconfigWithHttpInfo(String type) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'type' is set
if (type == null) {
throw new ApiException(400, "Missing the required parameter 'type' when calling getFieldconfig");
}
// create path and map variables
String pclocalVarPath = "/api/v2/fieldconfig".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "type", type));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get current user details.
* This request is not valid when using the Client Credentials OAuth grant.
* @param expand Which fields, if any, to expand. (optional)
* @return UserMe
* @throws ApiException if fails to make API call
*/
public UserMe getMe(List expand) throws ApiException {
return getMeWithHttpInfo(expand).getResponseObject();
}
/**
* Get current user details.
* This request is not valid when using the Client Credentials OAuth grant.
* @param expand Which fields, if any, to expand. (optional)
* @return UserMe
* @throws ApiException if fails to make API call
*/
public ApiResponse getMeWithHttpInfo(List expand) throws ApiException {
Object pclocalVarPostBody = null;
// create path and map variables
String pclocalVarPath = "/api/v2/users/me".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Search users using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return UsersSearchResponse
* @throws ApiException if fails to make API call
*/
public UsersSearchResponse getSearch(String q64, List expand) throws ApiException {
return getSearchWithHttpInfo(q64, expand).getResponseObject();
}
/**
* Search users using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return UsersSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getSearchWithHttpInfo(String q64, List expand) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'q64' is set
if (q64 == null) {
throw new ApiException(400, "Missing the required parameter 'q64' when calling getSearch");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/search".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "q64", q64));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get user.
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return User
* @throws ApiException if fails to make API call
*/
public User getUserId(String userId, List expand) throws ApiException {
return getUserIdWithHttpInfo(userId, expand).getResponseObject();
}
/**
* Get user.
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return User
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdWithHttpInfo(String userId, List expand) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserId");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get adjacents
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return Adjacents
* @throws ApiException if fails to make API call
*/
public Adjacents getUserIdAdjacents(String userId, List expand) throws ApiException {
return getUserIdAdjacentsWithHttpInfo(userId, expand).getResponseObject();
}
/**
* Get adjacents
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return Adjacents
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdAdjacentsWithHttpInfo(String userId, List expand) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdAdjacents");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/adjacents".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get a user's CallForwarding
*
* @param userId User ID (required)
* @return CallForwarding
* @throws ApiException if fails to make API call
*/
public CallForwarding getUserIdCallforwarding(String userId) throws ApiException {
return getUserIdCallforwardingWithHttpInfo(userId).getResponseObject();
}
/**
* Get a user's CallForwarding
*
* @param userId User ID (required)
* @return CallForwarding
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdCallforwardingWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdCallforwarding");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/callforwarding".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get direct reports
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return List
* @throws ApiException if fails to make API call
*/
public List getUserIdDirectreports(String userId, List expand) throws ApiException {
return getUserIdDirectreportsWithHttpInfo(userId, expand).getResponseObject();
}
/**
* Get direct reports
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return List
* @throws ApiException if fails to make API call
*/
public ApiResponse> getUserIdDirectreportsWithHttpInfo(String userId, List expand) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdDirectreports");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/directreports".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference>() {});
}
/**
* Get favorites
*
* @param userId User ID (required)
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param sortOrder Sort order (optional, default to ASC)
* @param expand Which fields, if any, to expand (optional)
* @return UserEntityListing
* @throws ApiException if fails to make API call
*/
public UserEntityListing getUserIdFavorites(String userId, Integer pageSize, Integer pageNumber, String sortOrder, List expand) throws ApiException {
return getUserIdFavoritesWithHttpInfo(userId, pageSize, pageNumber, sortOrder, expand).getResponseObject();
}
/**
* Get favorites
*
* @param userId User ID (required)
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param sortOrder Sort order (optional, default to ASC)
* @param expand Which fields, if any, to expand (optional)
* @return UserEntityListing
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdFavoritesWithHttpInfo(String userId, Integer pageSize, Integer pageNumber, String sortOrder, List expand) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdFavorites");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/favorites".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "sortOrder", sortOrder));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get a user's Geolocation
*
* @param userId user Id (required)
* @param clientId client Id (required)
* @return Geolocation
* @throws ApiException if fails to make API call
*/
public Geolocation getUserIdGeolocationsClientId(String userId, String clientId) throws ApiException {
return getUserIdGeolocationsClientIdWithHttpInfo(userId, clientId).getResponseObject();
}
/**
* Get a user's Geolocation
*
* @param userId user Id (required)
* @param clientId client Id (required)
* @return Geolocation
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdGeolocationsClientIdWithHttpInfo(String userId, String clientId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdGeolocationsClientId");
}
// verify the required parameter 'clientId' is set
if (clientId == null) {
throw new ApiException(400, "Missing the required parameter 'clientId' when calling getUserIdGeolocationsClientId");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/geolocations/{clientId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()))
.replaceAll("\\{" + "clientId" + "\\}", pcapiClient.escapeString(clientId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get a OutOfOffice
*
* @param userId User ID (required)
* @return OutOfOffice
* @throws ApiException if fails to make API call
*/
public OutOfOffice getUserIdOutofoffice(String userId) throws ApiException {
return getUserIdOutofofficeWithHttpInfo(userId).getResponseObject();
}
/**
* Get a OutOfOffice
*
* @param userId User ID (required)
* @return OutOfOffice
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdOutofofficeWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdOutofoffice");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/outofoffice".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* List profile skills for a user
*
* @param userId User ID (required)
* @return List
* @throws ApiException if fails to make API call
*/
public List getUserIdProfileskills(String userId) throws ApiException {
return getUserIdProfileskillsWithHttpInfo(userId).getResponseObject();
}
/**
* List profile skills for a user
*
* @param userId User ID (required)
* @return List
* @throws ApiException if fails to make API call
*/
public ApiResponse> getUserIdProfileskillsWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdProfileskills");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/profileskills".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference>() {});
}
/**
* Get queues for user
*
* @param userId User ID (required)
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param joined Is joined to the queue (optional, default to true)
* @return UserQueueEntityListing
* @throws ApiException if fails to make API call
*/
public UserQueueEntityListing getUserIdQueues(String userId, Integer pageSize, Integer pageNumber, Boolean joined) throws ApiException {
return getUserIdQueuesWithHttpInfo(userId, pageSize, pageNumber, joined).getResponseObject();
}
/**
* Get queues for user
*
* @param userId User ID (required)
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param joined Is joined to the queue (optional, default to true)
* @return UserQueueEntityListing
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdQueuesWithHttpInfo(String userId, Integer pageSize, Integer pageNumber, Boolean joined) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdQueues");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/queues".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "joined", joined));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Returns a listing of roles and permissions for a user.
*
* @param userId User ID (required)
* @return UserAuthorization
* @throws ApiException if fails to make API call
*/
public UserAuthorization getUserIdRoles(String userId) throws ApiException {
return getUserIdRolesWithHttpInfo(userId).getResponseObject();
}
/**
* Returns a listing of roles and permissions for a user.
*
* @param userId User ID (required)
* @return UserAuthorization
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdRolesWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdRoles");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/roles".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* List routing skills for user
*
* @param userId User ID (required)
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param sortOrder Ascending or descending sort order (optional, default to ASC)
* @return UserSkillEntityListing
* @throws ApiException if fails to make API call
*/
public UserSkillEntityListing getUserIdRoutingskills(String userId, Integer pageSize, Integer pageNumber, String sortOrder) throws ApiException {
return getUserIdRoutingskillsWithHttpInfo(userId, pageSize, pageNumber, sortOrder).getResponseObject();
}
/**
* List routing skills for user
*
* @param userId User ID (required)
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param sortOrder Ascending or descending sort order (optional, default to ASC)
* @return UserSkillEntityListing
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdRoutingskillsWithHttpInfo(String userId, Integer pageSize, Integer pageNumber, String sortOrder) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdRoutingskills");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/routingskills".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "sortOrder", sortOrder));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Fetch the routing status of a user
*
* @param userId User ID (required)
* @return RoutingStatus
* @throws ApiException if fails to make API call
*/
public RoutingStatus getUserIdRoutingstatus(String userId) throws ApiException {
return getUserIdRoutingstatusWithHttpInfo(userId).getResponseObject();
}
/**
* Fetch the routing status of a user
*
* @param userId User ID (required)
* @return RoutingStatus
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdRoutingstatusWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdRoutingstatus");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/routingstatus".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get station information for user
*
* @param userId User ID (required)
* @return UserStations
* @throws ApiException if fails to make API call
*/
public UserStations getUserIdStation(String userId) throws ApiException {
return getUserIdStationWithHttpInfo(userId).getResponseObject();
}
/**
* Get station information for user
*
* @param userId User ID (required)
* @return UserStations
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserIdStationWithHttpInfo(String userId) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdStation");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/station".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Get superiors
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return List
* @throws ApiException if fails to make API call
*/
public List getUserIdSuperiors(String userId, List expand) throws ApiException {
return getUserIdSuperiorsWithHttpInfo(userId, expand).getResponseObject();
}
/**
* Get superiors
*
* @param userId User ID (required)
* @param expand Which fields, if any, to expand (optional)
* @return List
* @throws ApiException if fails to make API call
*/
public ApiResponse> getUserIdSuperiorsWithHttpInfo(String userId, List expand) throws ApiException {
Object pclocalVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling getUserIdSuperiors");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/superiors".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference>() {});
}
/**
* Get the list of available users.
*
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param id id (optional)
* @param sortOrder Ascending or descending sort order (optional, default to ASC)
* @param expand Which fields, if any, to expand (optional)
* @return UserEntityListing
* @throws ApiException if fails to make API call
*/
public UserEntityListing getUsers(Integer pageSize, Integer pageNumber, List id, String sortOrder, List expand) throws ApiException {
return getUsersWithHttpInfo(pageSize, pageNumber, id, sortOrder, expand).getResponseObject();
}
/**
* Get the list of available users.
*
* @param pageSize Page size (optional, default to 25)
* @param pageNumber Page number (optional, default to 1)
* @param id id (optional)
* @param sortOrder Ascending or descending sort order (optional, default to ASC)
* @param expand Which fields, if any, to expand (optional)
* @return UserEntityListing
* @throws ApiException if fails to make API call
*/
public ApiResponse getUsersWithHttpInfo(Integer pageSize, Integer pageNumber, List id, String sortOrder, List expand) throws ApiException {
Object pclocalVarPostBody = null;
// create path and map variables
String pclocalVarPath = "/api/v2/users".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "id", id));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "sortOrder", sortOrder));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Update user
*
* @param userId User ID (required)
* @param body User (required)
* @return User
* @throws ApiException if fails to make API call
*/
public User patchUserId(String userId, User body) throws ApiException {
return patchUserIdWithHttpInfo(userId, body).getResponseObject();
}
/**
* Update user
*
* @param userId User ID (required)
* @param body User (required)
* @return User
* @throws ApiException if fails to make API call
*/
public ApiResponse patchUserIdWithHttpInfo(String userId, User body) throws ApiException {
Object pclocalVarPostBody = body;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling patchUserId");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling patchUserId");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PATCH", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Patch a user's CallForwarding
*
* @param userId User ID (required)
* @param body Call forwarding (required)
* @return CallForwarding
* @throws ApiException if fails to make API call
*/
public CallForwarding patchUserIdCallforwarding(String userId, CallForwarding body) throws ApiException {
return patchUserIdCallforwardingWithHttpInfo(userId, body).getResponseObject();
}
/**
* Patch a user's CallForwarding
*
* @param userId User ID (required)
* @param body Call forwarding (required)
* @return CallForwarding
* @throws ApiException if fails to make API call
*/
public ApiResponse patchUserIdCallforwardingWithHttpInfo(String userId, CallForwarding body) throws ApiException {
Object pclocalVarPostBody = body;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling patchUserIdCallforwarding");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling patchUserIdCallforwarding");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/callforwarding".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PATCH", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Patch a user's Geolocation
* The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude values.
* @param userId user Id (required)
* @param clientId client Id (required)
* @param body Geolocation (required)
* @return Geolocation
* @throws ApiException if fails to make API call
*/
public Geolocation patchUserIdGeolocationsClientId(String userId, String clientId, Geolocation body) throws ApiException {
return patchUserIdGeolocationsClientIdWithHttpInfo(userId, clientId, body).getResponseObject();
}
/**
* Patch a user's Geolocation
* The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude values.
* @param userId user Id (required)
* @param clientId client Id (required)
* @param body Geolocation (required)
* @return Geolocation
* @throws ApiException if fails to make API call
*/
public ApiResponse patchUserIdGeolocationsClientIdWithHttpInfo(String userId, String clientId, Geolocation body) throws ApiException {
Object pclocalVarPostBody = body;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling patchUserIdGeolocationsClientId");
}
// verify the required parameter 'clientId' is set
if (clientId == null) {
throw new ApiException(400, "Missing the required parameter 'clientId' when calling patchUserIdGeolocationsClientId");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling patchUserIdGeolocationsClientId");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/geolocations/{clientId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()))
.replaceAll("\\{" + "clientId" + "\\}", pcapiClient.escapeString(clientId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PATCH", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Join or unjoin a set of queues for a user
*
* @param userId User ID (required)
* @param body User Queues (required)
* @return UserQueueEntityListing
* @throws ApiException if fails to make API call
*/
public UserQueueEntityListing patchUserIdQueues(String userId, List body) throws ApiException {
return patchUserIdQueuesWithHttpInfo(userId, body).getResponseObject();
}
/**
* Join or unjoin a set of queues for a user
*
* @param userId User ID (required)
* @param body User Queues (required)
* @return UserQueueEntityListing
* @throws ApiException if fails to make API call
*/
public ApiResponse patchUserIdQueuesWithHttpInfo(String userId, List body) throws ApiException {
Object pclocalVarPostBody = body;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling patchUserIdQueues");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling patchUserIdQueues");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/queues".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PATCH", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Join or unjoin a queue for a user
*
* @param queueId Queue ID (required)
* @param userId User ID (required)
* @param body Queue Member (required)
* @return UserQueue
* @throws ApiException if fails to make API call
*/
public UserQueue patchUserIdQueuesQueueId(String queueId, String userId, UserQueue body) throws ApiException {
return patchUserIdQueuesQueueIdWithHttpInfo(queueId, userId, body).getResponseObject();
}
/**
* Join or unjoin a queue for a user
*
* @param queueId Queue ID (required)
* @param userId User ID (required)
* @param body Queue Member (required)
* @return UserQueue
* @throws ApiException if fails to make API call
*/
public ApiResponse patchUserIdQueuesQueueIdWithHttpInfo(String queueId, String userId, UserQueue body) throws ApiException {
Object pclocalVarPostBody = body;
// verify the required parameter 'queueId' is set
if (queueId == null) {
throw new ApiException(400, "Missing the required parameter 'queueId' when calling patchUserIdQueuesQueueId");
}
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling patchUserIdQueuesQueueId");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling patchUserIdQueuesQueueId");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/{userId}/queues/{queueId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "queueId" + "\\}", pcapiClient.escapeString(queueId.toString()))
.replaceAll("\\{" + "userId" + "\\}", pcapiClient.escapeString(userId.toString()));
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
final String[] pclocalVarAccepts = {
"application/json"
};
final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);
final String[] pclocalVarContentTypes = {
"application/json"
};
final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);
String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };
return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PATCH", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Search users
*
* @param body Search request options (required)
* @return UsersSearchResponse
* @throws ApiException if fails to make API call
*/
public UsersSearchResponse postSearch(UserSearchRequest body) throws ApiException {
return postSearchWithHttpInfo(body).getResponseObject();
}
/**
* Search users
*
* @param body Search request options (required)
* @return UsersSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSearchWithHttpInfo(UserSearchRequest body) throws ApiException {
Object pclocalVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling postSearch");
}
// create path and map variables
String pclocalVarPath = "/api/v2/users/search".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap