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

com.mailslurp.apis.GroupControllerApi Maven / Gradle / Ivy

Go to download

Official MailSlurp email API - create real inboxes then send and receive emails and attachments from tests and code.

The newest version!
/*
 * MailSlurp API
 * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
 *
 * The version of the OpenAPI document: 6.5.2
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.mailslurp.apis;

import com.mailslurp.clients.ApiCallback;
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.ApiResponse;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.Pair;
import com.mailslurp.clients.ProgressRequestBody;
import com.mailslurp.clients.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.mailslurp.models.CreateGroupOptions;
import com.mailslurp.models.GroupContactsDto;
import com.mailslurp.models.GroupDto;
import com.mailslurp.models.GroupProjection;
import java.time.OffsetDateTime;
import com.mailslurp.models.PageContactProjection;
import com.mailslurp.models.PageGroupProjection;
import java.util.UUID;
import com.mailslurp.models.UpdateGroupContacts;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class GroupControllerApi {
    private ApiClient localVarApiClient;

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

    public GroupControllerApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for addContactsToGroup
     * @param groupId  (required)
     * @param updateGroupContacts  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call addContactsToGroupCall(UUID groupId, UpdateGroupContacts updateGroupContacts, final ApiCallback _callback) throws ApiException { Object localVarPostBody = updateGroupContacts; // create path and map variables String localVarPath = "/groups/{groupId}/contacts" .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addContactsToGroupValidateBeforeCall(UUID groupId, UpdateGroupContacts updateGroupContacts, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling addContactsToGroup(Async)"); } // verify the required parameter 'updateGroupContacts' is set if (updateGroupContacts == null) { throw new ApiException("Missing the required parameter 'updateGroupContacts' when calling addContactsToGroup(Async)"); } okhttp3.Call localVarCall = addContactsToGroupCall(groupId, updateGroupContacts, _callback); return localVarCall; } /** * Add contacts to a group * * @param groupId (required) * @param updateGroupContacts (required) * @return GroupContactsDto * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public GroupContactsDto addContactsToGroup(UUID groupId, UpdateGroupContacts updateGroupContacts) throws ApiException { ApiResponse localVarResp = addContactsToGroupWithHttpInfo(groupId, updateGroupContacts); return localVarResp.getData(); } /** * Add contacts to a group * * @param groupId (required) * @param updateGroupContacts (required) * @return ApiResponse<GroupContactsDto> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse addContactsToGroupWithHttpInfo(UUID groupId, UpdateGroupContacts updateGroupContacts) throws ApiException { okhttp3.Call localVarCall = addContactsToGroupValidateBeforeCall(groupId, updateGroupContacts, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add contacts to a group (asynchronously) * * @param groupId (required) * @param updateGroupContacts (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call addContactsToGroupAsync(UUID groupId, UpdateGroupContacts updateGroupContacts, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addContactsToGroupValidateBeforeCall(groupId, updateGroupContacts, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createGroup * @param createGroupOptions (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
201 Created -
*/ public okhttp3.Call createGroupCall(CreateGroupOptions createGroupOptions, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createGroupOptions; // create path and map variables String localVarPath = "/groups"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createGroupValidateBeforeCall(CreateGroupOptions createGroupOptions, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createGroupOptions' is set if (createGroupOptions == null) { throw new ApiException("Missing the required parameter 'createGroupOptions' when calling createGroup(Async)"); } okhttp3.Call localVarCall = createGroupCall(createGroupOptions, _callback); return localVarCall; } /** * Create a group * * @param createGroupOptions (required) * @return GroupDto * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 Created -
*/ public GroupDto createGroup(CreateGroupOptions createGroupOptions) throws ApiException { ApiResponse localVarResp = createGroupWithHttpInfo(createGroupOptions); return localVarResp.getData(); } /** * Create a group * * @param createGroupOptions (required) * @return ApiResponse<GroupDto> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 Created -
*/ public ApiResponse createGroupWithHttpInfo(CreateGroupOptions createGroupOptions) throws ApiException { okhttp3.Call localVarCall = createGroupValidateBeforeCall(createGroupOptions, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create a group (asynchronously) * * @param createGroupOptions (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
201 Created -
*/ public okhttp3.Call createGroupAsync(CreateGroupOptions createGroupOptions, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupValidateBeforeCall(createGroupOptions, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteGroup * @param groupId (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 No Content -
*/ public okhttp3.Call deleteGroupCall(UUID groupId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/groups/{groupId}" .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteGroupValidateBeforeCall(UUID groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroup(Async)"); } okhttp3.Call localVarCall = deleteGroupCall(groupId, _callback); return localVarCall; } /** * Delete group * * @param groupId (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 No Content -
*/ public void deleteGroup(UUID groupId) throws ApiException { deleteGroupWithHttpInfo(groupId); } /** * Delete group * * @param groupId (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 No Content -
*/ public ApiResponse deleteGroupWithHttpInfo(UUID groupId) throws ApiException { okhttp3.Call localVarCall = deleteGroupValidateBeforeCall(groupId, null); return localVarApiClient.execute(localVarCall); } /** * Delete group (asynchronously) * * @param groupId (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 No Content -
*/ public okhttp3.Call deleteGroupAsync(UUID groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupValidateBeforeCall(groupId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getAllGroups * @param page Optional page index in list pagination (optional, default to 0) * @param size Optional page size in list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getAllGroupsCall(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/groups/paginated"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (size != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); } if (sort != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); } if (since != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since)); } if (before != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before)); } Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAllGroupsValidateBeforeCall(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllGroupsCall(page, size, sort, since, before, _callback); return localVarCall; } /** * Get all Contact Groups in paginated format * * @param page Optional page index in list pagination (optional, default to 0) * @param size Optional page size in list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @return PageGroupProjection * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public PageGroupProjection getAllGroups(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { ApiResponse localVarResp = getAllGroupsWithHttpInfo(page, size, sort, since, before); return localVarResp.getData(); } /** * Get all Contact Groups in paginated format * * @param page Optional page index in list pagination (optional, default to 0) * @param size Optional page size in list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @return ApiResponse<PageGroupProjection> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse getAllGroupsWithHttpInfo(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { okhttp3.Call localVarCall = getAllGroupsValidateBeforeCall(page, size, sort, since, before, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all Contact Groups in paginated format (asynchronously) * * @param page Optional page index in list pagination (optional, default to 0) * @param size Optional page size in list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getAllGroupsAsync(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllGroupsValidateBeforeCall(page, size, sort, since, before, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getGroup * @param groupId (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupCall(UUID groupId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/groups/{groupId}" .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupValidateBeforeCall(UUID groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroup(Async)"); } okhttp3.Call localVarCall = getGroupCall(groupId, _callback); return localVarCall; } /** * Get group * * @param groupId (required) * @return GroupDto * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public GroupDto getGroup(UUID groupId) throws ApiException { ApiResponse localVarResp = getGroupWithHttpInfo(groupId); return localVarResp.getData(); } /** * Get group * * @param groupId (required) * @return ApiResponse<GroupDto> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse getGroupWithHttpInfo(UUID groupId) throws ApiException { okhttp3.Call localVarCall = getGroupValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get group (asynchronously) * * @param groupId (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupAsync(UUID groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getGroupWithContacts * @param groupId (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupWithContactsCall(UUID groupId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/groups/{groupId}/contacts" .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupWithContactsValidateBeforeCall(UUID groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupWithContacts(Async)"); } okhttp3.Call localVarCall = getGroupWithContactsCall(groupId, _callback); return localVarCall; } /** * Get group and contacts belonging to it * * @param groupId (required) * @return GroupContactsDto * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public GroupContactsDto getGroupWithContacts(UUID groupId) throws ApiException { ApiResponse localVarResp = getGroupWithContactsWithHttpInfo(groupId); return localVarResp.getData(); } /** * Get group and contacts belonging to it * * @param groupId (required) * @return ApiResponse<GroupContactsDto> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse getGroupWithContactsWithHttpInfo(UUID groupId) throws ApiException { okhttp3.Call localVarCall = getGroupWithContactsValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get group and contacts belonging to it (asynchronously) * * @param groupId (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupWithContactsAsync(UUID groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupWithContactsValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getGroupWithContactsPaginated * @param groupId (required) * @param page Optional page index in group contact pagination (optional, default to 0) * @param size Optional page size in group contact pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupWithContactsPaginatedCall(UUID groupId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/groups/{groupId}/contacts-paginated" .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (size != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); } if (sort != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); } if (since != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since)); } if (before != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before)); } Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupWithContactsPaginatedValidateBeforeCall(UUID groupId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupWithContactsPaginated(Async)"); } okhttp3.Call localVarCall = getGroupWithContactsPaginatedCall(groupId, page, size, sort, since, before, _callback); return localVarCall; } /** * * Get group and paginated contacts belonging to it * @param groupId (required) * @param page Optional page index in group contact pagination (optional, default to 0) * @param size Optional page size in group contact pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @return PageContactProjection * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public PageContactProjection getGroupWithContactsPaginated(UUID groupId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { ApiResponse localVarResp = getGroupWithContactsPaginatedWithHttpInfo(groupId, page, size, sort, since, before); return localVarResp.getData(); } /** * * Get group and paginated contacts belonging to it * @param groupId (required) * @param page Optional page index in group contact pagination (optional, default to 0) * @param size Optional page size in group contact pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @return ApiResponse<PageContactProjection> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse getGroupWithContactsPaginatedWithHttpInfo(UUID groupId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { okhttp3.Call localVarCall = getGroupWithContactsPaginatedValidateBeforeCall(groupId, page, size, sort, since, before, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Get group and paginated contacts belonging to it * @param groupId (required) * @param page Optional page index in group contact pagination (optional, default to 0) * @param size Optional page size in group contact pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupWithContactsPaginatedAsync(UUID groupId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupWithContactsPaginatedValidateBeforeCall(groupId, page, size, sort, since, before, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getGroups * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupsCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/groups"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupsValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupsCall(_callback); return localVarCall; } /** * Get all groups * * @return List<GroupProjection> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List getGroups() throws ApiException { ApiResponse> localVarResp = getGroupsWithHttpInfo(); return localVarResp.getData(); } /** * Get all groups * * @return ApiResponse<List<GroupProjection>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> getGroupsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getGroupsValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all groups (asynchronously) * * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getGroupsAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupsValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeContactsFromGroup * @param groupId (required) * @param updateGroupContacts (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call removeContactsFromGroupCall(UUID groupId, UpdateGroupContacts updateGroupContacts, final ApiCallback _callback) throws ApiException { Object localVarPostBody = updateGroupContacts; // create path and map variables String localVarPath = "/groups/{groupId}/contacts" .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeContactsFromGroupValidateBeforeCall(UUID groupId, UpdateGroupContacts updateGroupContacts, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling removeContactsFromGroup(Async)"); } // verify the required parameter 'updateGroupContacts' is set if (updateGroupContacts == null) { throw new ApiException("Missing the required parameter 'updateGroupContacts' when calling removeContactsFromGroup(Async)"); } okhttp3.Call localVarCall = removeContactsFromGroupCall(groupId, updateGroupContacts, _callback); return localVarCall; } /** * Remove contacts from a group * * @param groupId (required) * @param updateGroupContacts (required) * @return GroupContactsDto * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public GroupContactsDto removeContactsFromGroup(UUID groupId, UpdateGroupContacts updateGroupContacts) throws ApiException { ApiResponse localVarResp = removeContactsFromGroupWithHttpInfo(groupId, updateGroupContacts); return localVarResp.getData(); } /** * Remove contacts from a group * * @param groupId (required) * @param updateGroupContacts (required) * @return ApiResponse<GroupContactsDto> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse removeContactsFromGroupWithHttpInfo(UUID groupId, UpdateGroupContacts updateGroupContacts) throws ApiException { okhttp3.Call localVarCall = removeContactsFromGroupValidateBeforeCall(groupId, updateGroupContacts, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove contacts from a group (asynchronously) * * @param groupId (required) * @param updateGroupContacts (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call removeContactsFromGroupAsync(UUID groupId, UpdateGroupContacts updateGroupContacts, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeContactsFromGroupValidateBeforeCall(groupId, updateGroupContacts, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy