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

com.unblu.webapi.jersey.v3.api.FileUploadInterceptorsApi Maven / Gradle / Ivy

There is a newer version: 7.51.0
Show newest version
package com.unblu.webapi.jersey.v3.api;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.ws.rs.core.GenericType;

import com.unblu.webapi.jersey.v3.invoker.ApiClient;
import com.unblu.webapi.jersey.v3.invoker.ApiException;
import com.unblu.webapi.jersey.v3.invoker.ApiResponse;
import com.unblu.webapi.jersey.v3.invoker.Configuration;
import com.unblu.webapi.jersey.v3.invoker.Pair;
import com.unblu.webapi.model.v3.FileUploadInterceptorData;
import com.unblu.webapi.model.v3.FileUploadInterceptorQuery;
import com.unblu.webapi.model.v3.FileUploadInterceptorResult;
import com.unblu.webapi.model.v3.FileUploadInterceptorsApproveFileUploadBody;
import com.unblu.webapi.model.v3.FileUploadInterceptorsPingWebhookBody;
import com.unblu.webapi.model.v3.FileUploadInterceptorsRejectFileUploadBody;
import com.unblu.webapi.model.v3.FileUploadInterceptorsValidateMimeTypeRegexBody;

public class FileUploadInterceptorsApi {
	private ApiClient apiClient;

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

	public FileUploadInterceptorsApi(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 fileUploadInterceptorsApproveFileUploadBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadInterceptorsApproveFileUpload(FileUploadInterceptorsApproveFileUploadBody fileUploadInterceptorsApproveFileUploadBody) throws ApiException {

		fileUploadInterceptorsApproveFileUploadWithHttpInfo(fileUploadInterceptorsApproveFileUploadBody);
	}

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

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

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/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 fileUploadInterceptorsCreate(FileUploadInterceptorData fileUploadInterceptorData) throws ApiException {
		return fileUploadInterceptorsCreateWithHttpInfo(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 fileUploadInterceptorsCreateWithHttpInfo(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 fileUploadInterceptorsCreate");
		}

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/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 id The ID of the file upload interceptor which should be deleted (optional)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadInterceptorsDelete(String id) throws ApiException {

		fileUploadInterceptorsDeleteWithHttpInfo(id);
	}

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

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/delete";

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

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

		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 fileUploadInterceptorsGetByName(String name) throws ApiException {
		return fileUploadInterceptorsGetByNameWithHttpInfo(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 fileUploadInterceptorsGetByNameWithHttpInfo(String name) throws ApiException {
		Object localVarPostBody = new HashMap<>();

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/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);
	}

	/**
	 * pingWebhook Emits a `WebhookPingEvent` on the configured webhook for the given file upload interceptor<br>
	 * 
	 * @param fileUploadInterceptorsPingWebhookBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadInterceptorsPingWebhook(FileUploadInterceptorsPingWebhookBody fileUploadInterceptorsPingWebhookBody) throws ApiException {

		fileUploadInterceptorsPingWebhookWithHttpInfo(fileUploadInterceptorsPingWebhookBody);
	}

	/**
	 * pingWebhook Emits a `WebhookPingEvent` on the configured webhook for the given file upload interceptor<br>
	 * 
	 * @param fileUploadInterceptorsPingWebhookBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadInterceptorsPingWebhookWithHttpInfo(FileUploadInterceptorsPingWebhookBody fileUploadInterceptorsPingWebhookBody) throws ApiException {
		Object localVarPostBody = fileUploadInterceptorsPingWebhookBody;

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

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/pingWebhook";

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

	/**
	 * read Reads an existing file upload interceptor.<br>
	 * 
	 * @param id The ID of the file upload interceptor to read (optional)
	 * @return FileUploadInterceptorData
	 * @throws ApiException if fails to make API call
	 */
	public FileUploadInterceptorData fileUploadInterceptorsRead(String id) throws ApiException {
		return fileUploadInterceptorsReadWithHttpInfo(id).getData();
	}

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

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/read";

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

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

		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 fileUploadInterceptorsRejectFileUploadBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadInterceptorsRejectFileUpload(FileUploadInterceptorsRejectFileUploadBody fileUploadInterceptorsRejectFileUploadBody) throws ApiException {

		fileUploadInterceptorsRejectFileUploadWithHttpInfo(fileUploadInterceptorsRejectFileUploadBody);
	}

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

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

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/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 fileUploadInterceptorsSearch(FileUploadInterceptorQuery fileUploadInterceptorQuery) throws ApiException {
		return fileUploadInterceptorsSearchWithHttpInfo(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 fileUploadInterceptorsSearchWithHttpInfo(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 fileUploadInterceptorsSearch");
		}

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/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);
	}

	/**
	 * update Updates an existing file upload interceptor<br>
	 * 
	 * @param fileUploadInterceptorData (required)
	 * @return FileUploadInterceptorData
	 * @throws ApiException if fails to make API call
	 */
	public FileUploadInterceptorData fileUploadInterceptorsUpdate(FileUploadInterceptorData fileUploadInterceptorData) throws ApiException {
		return fileUploadInterceptorsUpdateWithHttpInfo(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 fileUploadInterceptorsUpdateWithHttpInfo(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 fileUploadInterceptorsUpdate");
		}

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/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);
	}

	/**
	 * validateMimeTypeRegex validateMimeTypeRegex operation
	 * 
	 * @param fileUploadInterceptorsValidateMimeTypeRegexBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public void fileUploadInterceptorsValidateMimeTypeRegex(FileUploadInterceptorsValidateMimeTypeRegexBody fileUploadInterceptorsValidateMimeTypeRegexBody) throws ApiException {

		fileUploadInterceptorsValidateMimeTypeRegexWithHttpInfo(fileUploadInterceptorsValidateMimeTypeRegexBody);
	}

	/**
	 * validateMimeTypeRegex validateMimeTypeRegex operation
	 * 
	 * @param fileUploadInterceptorsValidateMimeTypeRegexBody (required)
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse fileUploadInterceptorsValidateMimeTypeRegexWithHttpInfo(FileUploadInterceptorsValidateMimeTypeRegexBody fileUploadInterceptorsValidateMimeTypeRegexBody) throws ApiException {
		Object localVarPostBody = fileUploadInterceptorsValidateMimeTypeRegexBody;

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

		// create path and map variables
		String localVarPath = "/fileuploadinterceptors/validateMimeTypeRegex";

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy