com.mypurecloud.sdk.api.SearchApi 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.ErrorBody;
import com.mypurecloud.sdk.model.DocumentationSearchResponse;
import com.mypurecloud.sdk.model.GroupsSearchResponse;
import com.mypurecloud.sdk.model.LocationsSearchResponse;
import com.mypurecloud.sdk.model.JsonNodeSearchResponse;
import com.mypurecloud.sdk.model.UsersSearchResponse;
import com.mypurecloud.sdk.model.VoicemailsSearchResponse;
import com.mypurecloud.sdk.model.DocumentationSearchRequest;
import com.mypurecloud.sdk.model.GroupSearchRequest;
import com.mypurecloud.sdk.model.LocationSearchRequest;
import com.mypurecloud.sdk.model.SearchRequest;
import com.mypurecloud.sdk.model.UserSearchRequest;
import com.mypurecloud.sdk.model.VoicemailSearchRequest;
import com.mypurecloud.sdk.model.SuggestSearchRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SearchApi {
private ApiClient pcapiClient;
public SearchApi() {
this(Configuration.getDefaultApiClient());
}
public SearchApi(ApiClient apiClient) {
this.pcapiClient = apiClient;
}
public ApiClient getApiClient() {
return pcapiClient;
}
public void setApiClient(ApiClient apiClient) {
this.pcapiClient = apiClient;
}
/**
* Search documentation using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @return DocumentationSearchResponse
* @throws ApiException if fails to make API call
*/
public DocumentationSearchResponse getSearch(String q64) throws ApiException {
return getSearchWithHttpInfo(q64).getResponseObject();
}
/**
* Search documentation using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @return DocumentationSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getSearchWithHttpInfo(String q64) 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/documentation/search".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "q64", q64));
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 groups using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return GroupsSearchResponse
* @throws ApiException if fails to make API call
*/
public GroupsSearchResponse getSearch_0(String q64, List expand) throws ApiException {
return getSearch_0WithHttpInfo(q64, expand).getResponseObject();
}
/**
* Search groups using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return GroupsSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getSearch_0WithHttpInfo(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_0");
}
// create path and map variables
String pclocalVarPath = "/api/v2/groups/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() {});
}
/**
* Search locations using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return LocationsSearchResponse
* @throws ApiException if fails to make API call
*/
public LocationsSearchResponse getSearch_1(String q64, List expand) throws ApiException {
return getSearch_1WithHttpInfo(q64, expand).getResponseObject();
}
/**
* Search locations using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return LocationsSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getSearch_1WithHttpInfo(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_1");
}
// create path and map variables
String pclocalVarPath = "/api/v2/locations/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() {});
}
/**
* Search using the q64 value returned from a previous search.
*
* @param q64 q64 (required)
* @param expand Which fields, if any, to expand (optional)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public JsonNodeSearchResponse getSearch_2(String q64, List expand, Boolean profile) throws ApiException {
return getSearch_2WithHttpInfo(q64, expand, profile).getResponseObject();
}
/**
* Search using the q64 value returned from a previous search.
*
* @param q64 q64 (required)
* @param expand Which fields, if any, to expand (optional)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getSearch_2WithHttpInfo(String q64, List expand, Boolean profile) 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_2");
}
// create path and map variables
String pclocalVarPath = "/api/v2/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));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "profile", profile));
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_3(String q64, List expand) throws ApiException {
return getSearch_3WithHttpInfo(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 getSearch_3WithHttpInfo(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_3");
}
// 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() {});
}
/**
* Search voicemails using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return VoicemailsSearchResponse
* @throws ApiException if fails to make API call
*/
public VoicemailsSearchResponse getSearch_4(String q64, List expand) throws ApiException {
return getSearch_4WithHttpInfo(q64, expand).getResponseObject();
}
/**
* Search voicemails using the q64 value returned from a previous search
*
* @param q64 q64 (required)
* @param expand expand (optional)
* @return VoicemailsSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getSearch_4WithHttpInfo(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_4");
}
// create path and map variables
String pclocalVarPath = "/api/v2/voicemail/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() {});
}
/**
* Suggest resources using the q64 value returned from a previous suggest query.
*
* @param q64 q64 (required)
* @param expand Which fields, if any, to expand (optional)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public JsonNodeSearchResponse getSuggest(String q64, List expand, Boolean profile) throws ApiException {
return getSuggestWithHttpInfo(q64, expand, profile).getResponseObject();
}
/**
* Suggest resources using the q64 value returned from a previous suggest query.
*
* @param q64 q64 (required)
* @param expand Which fields, if any, to expand (optional)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getSuggestWithHttpInfo(String q64, List expand, Boolean profile) 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 getSuggest");
}
// create path and map variables
String pclocalVarPath = "/api/v2/search/suggest".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));
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "profile", profile));
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 documentation
*
* @param body Search request options (required)
* @return DocumentationSearchResponse
* @throws ApiException if fails to make API call
*/
public DocumentationSearchResponse postSearch(DocumentationSearchRequest body) throws ApiException {
return postSearchWithHttpInfo(body).getResponseObject();
}
/**
* Search documentation
*
* @param body Search request options (required)
* @return DocumentationSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSearchWithHttpInfo(DocumentationSearchRequest 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/documentation/search".replaceAll("\\{format\\}","json");
// 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, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Search groups
*
* @param body Search request options (required)
* @return GroupsSearchResponse
* @throws ApiException if fails to make API call
*/
public GroupsSearchResponse postSearch_0(GroupSearchRequest body) throws ApiException {
return postSearch_0WithHttpInfo(body).getResponseObject();
}
/**
* Search groups
*
* @param body Search request options (required)
* @return GroupsSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSearch_0WithHttpInfo(GroupSearchRequest 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_0");
}
// create path and map variables
String pclocalVarPath = "/api/v2/groups/search".replaceAll("\\{format\\}","json");
// 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, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Search locations
*
* @param body Search request options (required)
* @return LocationsSearchResponse
* @throws ApiException if fails to make API call
*/
public LocationsSearchResponse postSearch_1(LocationSearchRequest body) throws ApiException {
return postSearch_1WithHttpInfo(body).getResponseObject();
}
/**
* Search locations
*
* @param body Search request options (required)
* @return LocationsSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSearch_1WithHttpInfo(LocationSearchRequest 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_1");
}
// create path and map variables
String pclocalVarPath = "/api/v2/locations/search".replaceAll("\\{format\\}","json");
// 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, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Search resources.
*
* @param body Search request options (required)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public JsonNodeSearchResponse postSearch_2(SearchRequest body, Boolean profile) throws ApiException {
return postSearch_2WithHttpInfo(body, profile).getResponseObject();
}
/**
* Search resources.
*
* @param body Search request options (required)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSearch_2WithHttpInfo(SearchRequest body, Boolean profile) 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_2");
}
// create path and map variables
String pclocalVarPath = "/api/v2/search".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "profile", profile));
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, "POST", 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_3(UserSearchRequest body) throws ApiException {
return postSearch_3WithHttpInfo(body).getResponseObject();
}
/**
* Search users
*
* @param body Search request options (required)
* @return UsersSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSearch_3WithHttpInfo(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_3");
}
// 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();
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, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Search voicemails
*
* @param body Search request options (required)
* @return VoicemailsSearchResponse
* @throws ApiException if fails to make API call
*/
public VoicemailsSearchResponse postSearch_4(VoicemailSearchRequest body) throws ApiException {
return postSearch_4WithHttpInfo(body).getResponseObject();
}
/**
* Search voicemails
*
* @param body Search request options (required)
* @return VoicemailsSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSearch_4WithHttpInfo(VoicemailSearchRequest 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_4");
}
// create path and map variables
String pclocalVarPath = "/api/v2/voicemail/search".replaceAll("\\{format\\}","json");
// 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, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
/**
* Suggest resources.
*
* @param body Search request options (required)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public JsonNodeSearchResponse postSuggest(SuggestSearchRequest body, Boolean profile) throws ApiException {
return postSuggestWithHttpInfo(body, profile).getResponseObject();
}
/**
* Suggest resources.
*
* @param body Search request options (required)
* @param profile profile (optional, default to true)
* @return JsonNodeSearchResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse postSuggestWithHttpInfo(SuggestSearchRequest body, Boolean profile) 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 postSuggest");
}
// create path and map variables
String pclocalVarPath = "/api/v2/search/suggest".replaceAll("\\{format\\}","json");
// query params
List pclocalVarQueryParams = new ArrayList();
Map pclocalVarHeaderParams = new HashMap();
Map pclocalVarFormParams = new HashMap();
pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "profile", profile));
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, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
}
}