com.unblu.webapi.jersey.v4.api.CustomActionsApi 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
The newest version!
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.CustomActionData;
import com.unblu.webapi.model.v4.CustomActionQuery;
import com.unblu.webapi.model.v4.CustomActionResult;
import com.unblu.webapi.model.v4.ExpandFields;
import com.unblu.webapi.model.v4.PingResponse;
import jakarta.ws.rs.core.GenericType;
public class CustomActionsApi {
private ApiClient apiClient;
public CustomActionsApi() {
this(Configuration.getDefaultApiClient());
}
public CustomActionsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* create Creates a new custom action. You must specify the expanded parameter \"actionIcon\".<br>
*
* @param customActionData The custom action to create (required)
* @param expand (optional)
* @return CustomActionData
* @throws ApiException if fails to make API call
*/
public CustomActionData customActionsCreate(CustomActionData customActionData, List expand) throws ApiException {
return customActionsCreateWithHttpInfo(customActionData, expand).getData();
}
/**
* create Creates a new custom action. You must specify the expanded parameter \"actionIcon\".<br>
*
* @param customActionData The custom action to create (required)
* @param expand (optional)
* @return ApiResponse<CustomActionData>
* @throws ApiException if fails to make API call
*/
public ApiResponse customActionsCreateWithHttpInfo(CustomActionData customActionData, List expand) throws ApiException {
Object localVarPostBody = customActionData;
// verify the required parameter 'customActionData' is set
if (customActionData == null) {
throw new ApiException(400, "Missing the required parameter 'customActionData' when calling customActionsCreate");
}
// create path and map variables
String localVarPath = "/customactions/create";
// 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);
}
/**
* delete Deletes a custom action. If there's a webhook registration connected to the action, the webhook is also deleted.<br>
*
* @param customActionId (required)
* @throws ApiException if fails to make API call
*/
public void customActionsDelete(String customActionId) throws ApiException {
customActionsDeleteWithHttpInfo(customActionId);
}
/**
* delete Deletes a custom action. If there's a webhook registration connected to the action, the webhook is also deleted.<br>
*
* @param customActionId (required)
* @throws ApiException if fails to make API call
*/
public ApiResponse customActionsDeleteWithHttpInfo(String customActionId) throws ApiException {
Object localVarPostBody = new HashMap<>();
// verify the required parameter 'customActionId' is set
if (customActionId == null) {
throw new ApiException(400, "Missing the required parameter 'customActionId' when calling customActionsDelete");
}
// create path and map variables
String localVarPath = "/customactions/{customActionId}/delete"
.replaceAll("\\{" + "customActionId" + "\\}", apiClient.escapeString(customActionId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* read Returns a `CustomActionData` by ID<br>
*
* @param customActionId (required)
* @param expand (optional)
* @return CustomActionData
* @throws ApiException if fails to make API call
*/
public CustomActionData customActionsRead(String customActionId, List expand) throws ApiException {
return customActionsReadWithHttpInfo(customActionId, expand).getData();
}
/**
* read Returns a `CustomActionData` by ID<br>
*
* @param customActionId (required)
* @param expand (optional)
* @return ApiResponse<CustomActionData>
* @throws ApiException if fails to make API call
*/
public ApiResponse customActionsReadWithHttpInfo(String customActionId, List expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// verify the required parameter 'customActionId' is set
if (customActionId == null) {
throw new ApiException(400, "Missing the required parameter 'customActionId' when calling customActionsRead");
}
// create path and map variables
String localVarPath = "/customactions/{customActionId}/read"
.replaceAll("\\{" + "customActionId" + "\\}", apiClient.escapeString(customActionId.toString()));
// 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);
}
/**
* search Search for custom actions<br>
*
* @param customActionQuery The query to use for the search (required)
* @return CustomActionResult
* @throws ApiException if fails to make API call
*/
public CustomActionResult customActionsSearch(CustomActionQuery customActionQuery) throws ApiException {
return customActionsSearchWithHttpInfo(customActionQuery).getData();
}
/**
* search Search for custom actions<br>
*
* @param customActionQuery The query to use for the search (required)
* @return ApiResponse<CustomActionResult>
* @throws ApiException if fails to make API call
*/
public ApiResponse customActionsSearchWithHttpInfo(CustomActionQuery customActionQuery) throws ApiException {
Object localVarPostBody = customActionQuery;
// verify the required parameter 'customActionQuery' is set
if (customActionQuery == null) {
throw new ApiException(400, "Missing the required parameter 'customActionQuery' when calling customActionsSearch");
}
// create path and map variables
String localVarPath = "/customactions/search";
// 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 = {
"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);
}
/**
* sendPing Emits a `WebhookPingEvent` or `PingRequest` on the configured webhook/outbound endpoint for the custom action.<br>
*
* @param customActionId The ID of the custom action (required)
* @return PingResponse
* @throws ApiException if fails to make API call
*/
public PingResponse customActionsSendPing(String customActionId) throws ApiException {
return customActionsSendPingWithHttpInfo(customActionId).getData();
}
/**
* sendPing Emits a `WebhookPingEvent` or `PingRequest` on the configured webhook/outbound endpoint for the custom action.<br>
*
* @param customActionId The ID of the custom action (required)
* @return ApiResponse<PingResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse customActionsSendPingWithHttpInfo(String customActionId) throws ApiException {
Object localVarPostBody = new HashMap<>();
// verify the required parameter 'customActionId' is set
if (customActionId == null) {
throw new ApiException(400, "Missing the required parameter 'customActionId' when calling customActionsSendPing");
}
// create path and map variables
String localVarPath = "/customactions/{customActionId}/sendPing"
.replaceAll("\\{" + "customActionId" + "\\}", apiClient.escapeString(customActionId.toString()));
// 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, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* update Updates a custom action. The parameter \"actionIcon\" may not be null.<br>
*
* @param customActionData The custom action to update (required)
* @param expand (optional)
* @return CustomActionData
* @throws ApiException if fails to make API call
*/
public CustomActionData customActionsUpdate(CustomActionData customActionData, List expand) throws ApiException {
return customActionsUpdateWithHttpInfo(customActionData, expand).getData();
}
/**
* update Updates a custom action. The parameter \"actionIcon\" may not be null.<br>
*
* @param customActionData The custom action to update (required)
* @param expand (optional)
* @return ApiResponse<CustomActionData>
* @throws ApiException if fails to make API call
*/
public ApiResponse customActionsUpdateWithHttpInfo(CustomActionData customActionData, List expand) throws ApiException {
Object localVarPostBody = customActionData;
// verify the required parameter 'customActionData' is set
if (customActionData == null) {
throw new ApiException(400, "Missing the required parameter 'customActionData' when calling customActionsUpdate");
}
// create path and map variables
String localVarPath = "/customactions/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);
}
}