All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.unblu.webapi.jersey.v4.api.FileUploadGlobalInterceptorsApi Maven / Gradle / Ivy

There is a newer version: 8.8.2
Show 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.FileUploadGlobalInterceptorsApproveFileUploadBody;
import com.unblu.webapi.model.v4.FileUploadGlobalInterceptorsRejectFileUploadBody;
import com.unblu.webapi.model.v4.FileUploadInterceptorData;
import com.unblu.webapi.model.v4.FileUploadInterceptorQuery;
import com.unblu.webapi.model.v4.FileUploadInterceptorResult;

import jakarta.ws.rs.core.GenericType;

public class FileUploadGlobalInterceptorsApi {
	private ApiClient apiClient;

	public FileUploadGlobalInterceptorsApi() {
		this(Configuration.getDefaultApiClient());
	}

	public FileUploadGlobalInterceptorsApi(ApiClient apiClient) {
		this.apiClient = apiClient;
	}

	public ApiClient getApiClient() {
		return apiClient;
	}

	public void setApiClient(ApiClient apiClient) {
		this.apiClient = apiClient;
	}

	/**
	 * approveFileUpload Approves a file upload for which approval was requested through a <code>file_upload_interceptor.new_file</code>
	 * webhook.<br>
	 * 
	 * @param fileUploadGlobalInterceptorsApproveFileUploadBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadGlobalInterceptorsApproveFileUpload(FileUploadGlobalInterceptorsApproveFileUploadBody fileUploadGlobalInterceptorsApproveFileUploadBody) throws ApiException {

		fileUploadGlobalInterceptorsApproveFileUploadWithHttpInfo(fileUploadGlobalInterceptorsApproveFileUploadBody);
	}

	/**
	 * approveFileUpload Approves a file upload for which approval was requested through a <code>file_upload_interceptor.new_file</code>
	 * webhook.<br>
	 * 
	 * @param fileUploadGlobalInterceptorsApproveFileUploadBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsApproveFileUploadWithHttpInfo(FileUploadGlobalInterceptorsApproveFileUploadBody fileUploadGlobalInterceptorsApproveFileUploadBody) throws ApiException {
		Object localVarPostBody = fileUploadGlobalInterceptorsApproveFileUploadBody;

		// verify the required parameter 'fileUploadGlobalInterceptorsApproveFileUploadBody' is set
		if (fileUploadGlobalInterceptorsApproveFileUploadBody == null) {
			throw new ApiException(400, "Missing the required parameter 'fileUploadGlobalInterceptorsApproveFileUploadBody' when calling fileUploadGlobalInterceptorsApproveFileUpload");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/approveFileUpload";

		// 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 = {
			"application/json"
		};
		final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

		String[] localVarAuthNames = new String[] { "basicAuth" };

		return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
	}

	/**
	 * create Creates a new file upload interceptor<br>
	 * 
	 * @param fileUploadInterceptorData The file upload interceptor to create (required)
	 * @return FileUploadInterceptorData
	 * @throws ApiException if fails to make API call
	 */
	public FileUploadInterceptorData fileUploadGlobalInterceptorsCreate(FileUploadInterceptorData fileUploadInterceptorData) throws ApiException {
		return fileUploadGlobalInterceptorsCreateWithHttpInfo(fileUploadInterceptorData).getData();
	}

	/**
	 * create Creates a new file upload interceptor<br>
	 * 
	 * @param fileUploadInterceptorData The file upload interceptor to create (required)
	 * @return ApiResponse<FileUploadInterceptorData>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsCreateWithHttpInfo(FileUploadInterceptorData fileUploadInterceptorData) throws ApiException {
		Object localVarPostBody = fileUploadInterceptorData;

		// verify the required parameter 'fileUploadInterceptorData' is set
		if (fileUploadInterceptorData == null) {
			throw new ApiException(400, "Missing the required parameter 'fileUploadInterceptorData' when calling fileUploadGlobalInterceptorsCreate");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/create";

		// 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);
	}

	/**
	 * delete Deletes an existing file upload interceptor<br>
	 * 
	 * @param interceptorId The ID of the file upload interceptor which should be deleted (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadGlobalInterceptorsDelete(String interceptorId) throws ApiException {

		fileUploadGlobalInterceptorsDeleteWithHttpInfo(interceptorId);
	}

	/**
	 * delete Deletes an existing file upload interceptor<br>
	 * 
	 * @param interceptorId The ID of the file upload interceptor which should be deleted (required)
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsDeleteWithHttpInfo(String interceptorId) throws ApiException {
		Object localVarPostBody = new HashMap<>();

		// verify the required parameter 'interceptorId' is set
		if (interceptorId == null) {
			throw new ApiException(400, "Missing the required parameter 'interceptorId' when calling fileUploadGlobalInterceptorsDelete");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/{interceptorId}/delete"
				.replaceAll("\\{" + "interceptorId" + "\\}", apiClient.escapeString(interceptorId.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);
	}

	/**
	 * getByName Searches for a file upload interceptor with the given name<br>
	 * 
	 * @param name The name of the file upload interceptor (optional)
	 * @return FileUploadInterceptorData
	 * @throws ApiException if fails to make API call
	 */
	public FileUploadInterceptorData fileUploadGlobalInterceptorsGetByName(String name) throws ApiException {
		return fileUploadGlobalInterceptorsGetByNameWithHttpInfo(name).getData();
	}

	/**
	 * getByName Searches for a file upload interceptor with the given name<br>
	 * 
	 * @param name The name of the file upload interceptor (optional)
	 * @return ApiResponse<FileUploadInterceptorData>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsGetByNameWithHttpInfo(String name) throws ApiException {
		Object localVarPostBody = new HashMap<>();

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/getByName";

		// query params
		List localVarQueryParams = new ArrayList();
		Map localVarHeaderParams = new HashMap();
		Map localVarFormParams = new HashMap();

		localVarQueryParams.addAll(apiClient.parameterToPairs("", "name", name));

		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 Reads an existing file upload interceptor.<br>
	 * 
	 * @param interceptorId The ID of the file upload interceptor to read (required)
	 * @return FileUploadInterceptorData
	 * @throws ApiException if fails to make API call
	 */
	public FileUploadInterceptorData fileUploadGlobalInterceptorsRead(String interceptorId) throws ApiException {
		return fileUploadGlobalInterceptorsReadWithHttpInfo(interceptorId).getData();
	}

	/**
	 * read Reads an existing file upload interceptor.<br>
	 * 
	 * @param interceptorId The ID of the file upload interceptor to read (required)
	 * @return ApiResponse<FileUploadInterceptorData>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsReadWithHttpInfo(String interceptorId) throws ApiException {
		Object localVarPostBody = new HashMap<>();

		// verify the required parameter 'interceptorId' is set
		if (interceptorId == null) {
			throw new ApiException(400, "Missing the required parameter 'interceptorId' when calling fileUploadGlobalInterceptorsRead");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/{interceptorId}/read"
				.replaceAll("\\{" + "interceptorId" + "\\}", apiClient.escapeString(interceptorId.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, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
	}

	/**
	 * rejectFileUpload Rejects a file upload for which approval was requested through a <code>file_upload_interceptor.new_file</code>
	 * webhook.<br>
	 * 
	 * @param fileUploadGlobalInterceptorsRejectFileUploadBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadGlobalInterceptorsRejectFileUpload(FileUploadGlobalInterceptorsRejectFileUploadBody fileUploadGlobalInterceptorsRejectFileUploadBody) throws ApiException {

		fileUploadGlobalInterceptorsRejectFileUploadWithHttpInfo(fileUploadGlobalInterceptorsRejectFileUploadBody);
	}

	/**
	 * rejectFileUpload Rejects a file upload for which approval was requested through a <code>file_upload_interceptor.new_file</code>
	 * webhook.<br>
	 * 
	 * @param fileUploadGlobalInterceptorsRejectFileUploadBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsRejectFileUploadWithHttpInfo(FileUploadGlobalInterceptorsRejectFileUploadBody fileUploadGlobalInterceptorsRejectFileUploadBody) throws ApiException {
		Object localVarPostBody = fileUploadGlobalInterceptorsRejectFileUploadBody;

		// verify the required parameter 'fileUploadGlobalInterceptorsRejectFileUploadBody' is set
		if (fileUploadGlobalInterceptorsRejectFileUploadBody == null) {
			throw new ApiException(400, "Missing the required parameter 'fileUploadGlobalInterceptorsRejectFileUploadBody' when calling fileUploadGlobalInterceptorsRejectFileUpload");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/rejectFileUpload";

		// 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 = {
			"application/json"
		};
		final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

		String[] localVarAuthNames = new String[] { "basicAuth" };

		return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
	}

	/**
	 * search Searches for file upload interceptors in the current account<br>
	 * 
	 * @param fileUploadInterceptorQuery (required)
	 * @return FileUploadInterceptorResult
	 * @throws ApiException if fails to make API call
	 */
	public FileUploadInterceptorResult fileUploadGlobalInterceptorsSearch(FileUploadInterceptorQuery fileUploadInterceptorQuery) throws ApiException {
		return fileUploadGlobalInterceptorsSearchWithHttpInfo(fileUploadInterceptorQuery).getData();
	}

	/**
	 * search Searches for file upload interceptors in the current account<br>
	 * 
	 * @param fileUploadInterceptorQuery (required)
	 * @return ApiResponse<FileUploadInterceptorResult>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsSearchWithHttpInfo(FileUploadInterceptorQuery fileUploadInterceptorQuery) throws ApiException {
		Object localVarPostBody = fileUploadInterceptorQuery;

		// verify the required parameter 'fileUploadInterceptorQuery' is set
		if (fileUploadInterceptorQuery == null) {
			throw new ApiException(400, "Missing the required parameter 'fileUploadInterceptorQuery' when calling fileUploadGlobalInterceptorsSearch");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/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` on the configured webhook for the given file upload interceptor<br>
	 * 
	 * @param interceptorId The ID of the file upload interceptor (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadGlobalInterceptorsSendPing(String interceptorId) throws ApiException {

		fileUploadGlobalInterceptorsSendPingWithHttpInfo(interceptorId);
	}

	/**
	 * sendPing Emits a `WebhookPingEvent` on the configured webhook for the given file upload interceptor<br>
	 * 
	 * @param interceptorId The ID of the file upload interceptor (required)
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsSendPingWithHttpInfo(String interceptorId) throws ApiException {
		Object localVarPostBody = new HashMap<>();

		// verify the required parameter 'interceptorId' is set
		if (interceptorId == null) {
			throw new ApiException(400, "Missing the required parameter 'interceptorId' when calling fileUploadGlobalInterceptorsSendPing");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/{interceptorId}/sendPing"
				.replaceAll("\\{" + "interceptorId" + "\\}", apiClient.escapeString(interceptorId.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, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
	}

	/**
	 * update Updates an existing file upload interceptor<br>
	 * 
	 * @param fileUploadInterceptorData (required)
	 * @return FileUploadInterceptorData
	 * @throws ApiException if fails to make API call
	 */
	public FileUploadInterceptorData fileUploadGlobalInterceptorsUpdate(FileUploadInterceptorData fileUploadInterceptorData) throws ApiException {
		return fileUploadGlobalInterceptorsUpdateWithHttpInfo(fileUploadInterceptorData).getData();
	}

	/**
	 * update Updates an existing file upload interceptor<br>
	 * 
	 * @param fileUploadInterceptorData (required)
	 * @return ApiResponse<FileUploadInterceptorData>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadGlobalInterceptorsUpdateWithHttpInfo(FileUploadInterceptorData fileUploadInterceptorData) throws ApiException {
		Object localVarPostBody = fileUploadInterceptorData;

		// verify the required parameter 'fileUploadInterceptorData' is set
		if (fileUploadInterceptorData == null) {
			throw new ApiException(400, "Missing the required parameter 'fileUploadInterceptorData' when calling fileUploadGlobalInterceptorsUpdate");
		}

		// create path and map variables
		String localVarPath = "/fileuploadglobalinterceptors/update";

		// 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);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy