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

com.unblu.webapi.jersey.v3.api.PersonPresencesApi 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 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.PersonPresenceData;
import com.unblu.webapi.model.v3.PersonPresenceQuery;
import com.unblu.webapi.model.v3.PersonPresenceResult;

public class PersonPresencesApi {
	private ApiClient apiClient;

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

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

	public ApiClient getApiClient() {
		return apiClient;
	}

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

	/**
	 * read Helper method read a `PersonPresenceData` by id<br>
	 * 
	 * @param id (optional)
	 * @return PersonPresenceData
	 * @throws ApiException if fails to make API call
	 */
	public PersonPresenceData personPresencesRead(String id) throws ApiException {
		return personPresencesReadWithHttpInfo(id).getData();
	}

	/**
	 * read Helper method read a `PersonPresenceData` by id<br>
	 * 
	 * @param id (optional)
	 * @return ApiResponse<PersonPresenceData>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse personPresencesReadWithHttpInfo(String id) throws ApiException {
		Object localVarPostBody = new HashMap<>();

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

	/**
	 * search Search for person presences in the current account<br>
	 * 
	 * @param personPresenceQuery (required)
	 * @return PersonPresenceResult
	 * @throws ApiException if fails to make API call
	 */
	public PersonPresenceResult personPresencesSearch(PersonPresenceQuery personPresenceQuery) throws ApiException {
		return personPresencesSearchWithHttpInfo(personPresenceQuery).getData();
	}

	/**
	 * search Search for person presences in the current account<br>
	 * 
	 * @param personPresenceQuery (required)
	 * @return ApiResponse<PersonPresenceResult>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse personPresencesSearchWithHttpInfo(PersonPresenceQuery personPresenceQuery) throws ApiException {
		Object localVarPostBody = personPresenceQuery;

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy