com.unblu.webapi.jersey.v4.api.GlobalApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jersey3-client-v4 Show documentation
Show all versions of jersey3-client-v4 Show documentation
Client implemented using Jersey
package com.unblu.webapi.jersey.v4.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.unblu.webapi.jersey.v4.invoker.ApiClient;
import com.unblu.webapi.jersey.v4.invoker.ApiException;
import com.unblu.webapi.jersey.v4.invoker.ApiResponse;
import com.unblu.webapi.jersey.v4.invoker.Configuration;
import com.unblu.webapi.jersey.v4.invoker.Pair;
import com.unblu.webapi.model.v4.ExpandFields;
import com.unblu.webapi.model.v4.GlobalData;
import com.unblu.webapi.model.v4.GlobalPingResponse;
import com.unblu.webapi.model.v4.ProductVersion;
import com.unblu.webapi.model.v4.RecordedMinutesData;
import jakarta.ws.rs.core.GenericType;
public class GlobalApi {
private ApiClient apiClient;
public GlobalApi() {
this(Configuration.getDefaultApiClient());
}
public GlobalApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* getRecordedMinutes Returns the total length of all conversation recordings made between the given dates over all accounts. If there were no recordings in the
* given time, the return value is 0. <p><br>
*
* @param fromTime Date from which to count the conversation recording length. The value is rounded to the beginning of the day. (optional)
* @param toTime Date to which to count the conversation recording length. The value is rounded to the end of the day. (optional)
* @return RecordedMinutesData
* @throws ApiException if fails to make API call
*/
public RecordedMinutesData globalGetRecordedMinutes(Long fromTime, Long toTime) throws ApiException {
return globalGetRecordedMinutesWithHttpInfo(fromTime, toTime).getData();
}
/**
* getRecordedMinutes Returns the total length of all conversation recordings made between the given dates over all accounts. If there were no recordings in the
* given time, the return value is 0. <p><br>
*
* @param fromTime Date from which to count the conversation recording length. The value is rounded to the beginning of the day. (optional)
* @param toTime Date to which to count the conversation recording length. The value is rounded to the end of the day. (optional)
* @return ApiResponse<RecordedMinutesData>
* @throws ApiException if fails to make API call
*/
public ApiResponse globalGetRecordedMinutesWithHttpInfo(Long fromTime, Long toTime) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/global/getRecordedMinutes";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "fromTime", fromTime));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "toTime", toTime));
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);
}
/**
* installLicense Install a new license in the global server.<br>
*
* @param body licenseContent (required)
* @param expand (optional)
* @return GlobalData
* @throws ApiException if fails to make API call
*/
public GlobalData globalInstallLicense(String body, List expand) throws ApiException {
return globalInstallLicenseWithHttpInfo(body, expand).getData();
}
/**
* installLicense Install a new license in the global server.<br>
*
* @param body licenseContent (required)
* @param expand (optional)
* @return ApiResponse<GlobalData>
* @throws ApiException if fails to make API call
*/
public ApiResponse globalInstallLicenseWithHttpInfo(String body, List expand) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling globalInstallLicense");
}
// create path and map variables
String localVarPath = "/global/installLicense";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "expand", expand));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"text/plain"
};
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);
}
/**
* ping Checks whether the system is ready to receive requests. If the system is ready, it returns a 200 HTTP status, otherwise it returns a 503 HTTP
* status.<br>
*
* @return GlobalPingResponse
* @throws ApiException if fails to make API call
*/
public GlobalPingResponse globalPing() throws ApiException {
return globalPingWithHttpInfo().getData();
}
/**
* ping Checks whether the system is ready to receive requests. If the system is ready, it returns a 200 HTTP status, otherwise it returns a 503 HTTP
* status.<br>
*
* @return ApiResponse<GlobalPingResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse globalPingWithHttpInfo() throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/global/ping";
// 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);
}
/**
* productVersion productVersion operation
*
* @return ProductVersion
* @throws ApiException if fails to make API call
*/
public ProductVersion globalProductVersion() throws ApiException {
return globalProductVersionWithHttpInfo().getData();
}
/**
* productVersion productVersion operation
*
* @return ApiResponse<ProductVersion>
* @throws ApiException if fails to make API call
*/
public ApiResponse globalProductVersionWithHttpInfo() throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/global/productVersion";
// 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);
}
/**
* read Returns the GlobalData object containing information about the system (license, settings).<br>
*
* @param expand (optional)
* @return GlobalData
* @throws ApiException if fails to make API call
*/
public GlobalData globalRead(List expand) throws ApiException {
return globalReadWithHttpInfo(expand).getData();
}
/**
* read Returns the GlobalData object containing information about the system (license, settings).<br>
*
* @param expand (optional)
* @return ApiResponse<GlobalData>
* @throws ApiException if fails to make API call
*/
public ApiResponse globalReadWithHttpInfo(List expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/global/read";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "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);
}
/**
* removeLicense Remove a license from the global server if it was previously added via the UI or the installLicense WebAPI call.<br>
*
* @param expand (optional)
* @return GlobalData
* @throws ApiException if fails to make API call
*/
public GlobalData globalRemoveLicense(List expand) throws ApiException {
return globalRemoveLicenseWithHttpInfo(expand).getData();
}
/**
* removeLicense Remove a license from the global server if it was previously added via the UI or the installLicense WebAPI call.<br>
*
* @param expand (optional)
* @return ApiResponse<GlobalData>
* @throws ApiException if fails to make API call
*/
public ApiResponse globalRemoveLicenseWithHttpInfo(List expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/global/removeLicense";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "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, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* update Updates the GlobalData object. Since the properties of the Global object are read-only, this methods only make sense when used with the expand
* parameter.<br>
*
* @param globalData (required)
* @param expand (optional)
* @return GlobalData
* @throws ApiException if fails to make API call
*/
public GlobalData globalUpdate(GlobalData globalData, List expand) throws ApiException {
return globalUpdateWithHttpInfo(globalData, expand).getData();
}
/**
* update Updates the GlobalData object. Since the properties of the Global object are read-only, this methods only make sense when used with the expand
* parameter.<br>
*
* @param globalData (required)
* @param expand (optional)
* @return ApiResponse<GlobalData>
* @throws ApiException if fails to make API call
*/
public ApiResponse globalUpdateWithHttpInfo(GlobalData globalData, List expand) throws ApiException {
Object localVarPostBody = globalData;
// verify the required parameter 'globalData' is set
if (globalData == null) {
throw new ApiException(400, "Missing the required parameter 'globalData' when calling globalUpdate");
}
// create path and map variables
String localVarPath = "/global/update";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "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);
}
}