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

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

package com.unblu.webapi.jersey.v3.api;

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

import jakarta.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.GlobalData;
import com.unblu.webapi.model.v3.GlobalPingResponse;
import com.unblu.webapi.model.v3.ProductVersion;

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

	/**
	 * 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, String 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, String 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("", "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(String 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(String 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("", "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(String 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(String 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("", "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, String 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, String 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("", "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);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy