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

io.logicdrop.openapi.jersey.api.CacheServicesApi Maven / Gradle / Ivy

package io.logicdrop.openapi.jersey.api;

import io.logicdrop.openapi.jersey.ApiException;
import io.logicdrop.openapi.jersey.ApiClient;
import io.logicdrop.openapi.jersey.ApiResponse;
import io.logicdrop.openapi.jersey.Configuration;
import io.logicdrop.openapi.jersey.Pair;

import javax.ws.rs.core.GenericType;

import io.logicdrop.openapi.models.CacheRequest;
import io.logicdrop.openapi.models.CacheResult;
import io.logicdrop.openapi.models.UserData;

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


public class CacheServicesApi {
  private ApiClient apiClient;

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

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

  public ApiClient getApiClient() {
    return apiClient;
  }

  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }
  /**
   * Evict cache entry
   * Evict cache entry
   * @param client Client name (required)
   * @param cache Cache name (required)
   * @param key Entry key (required)
   * @return UserData
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
200 Original value -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public UserData evictEntry(String client, String cache, String key) throws ApiException { return evictEntryWithHttpInfo(client, cache, key).getData(); } /** * Evict cache entry * Evict cache entry * @param client Client name (required) * @param cache Cache name (required) * @param key Entry key (required) * @return ApiResponse<UserData> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Original value -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public ApiResponse evictEntryWithHttpInfo(String client, String cache, String key) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'client' is set if (client == null) { throw new ApiException(400, "Missing the required parameter 'client' when calling evictEntry"); } // verify the required parameter 'cache' is set if (cache == null) { throw new ApiException(400, "Missing the required parameter 'cache' when calling evictEntry"); } // verify the required parameter 'key' is set if (key == null) { throw new ApiException(400, "Missing the required parameter 'key' when calling evictEntry"); } // create path and map variables String localVarPath = "/caches/{client}/{cache}/{key}" .replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString())) .replaceAll("\\{" + "cache" + "\\}", apiClient.escapeString(cache.toString())) .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = 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[] { "api", "jwt", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CacheServicesApi.evictEntry", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Flush cache * Clear the cache * @param client Client name (required) * @param cache Cache name (required) * @return CacheResult * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Flushed cache -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public CacheResult flushCache(String client, String cache) throws ApiException { return flushCacheWithHttpInfo(client, cache).getData(); } /** * Flush cache * Clear the cache * @param client Client name (required) * @param cache Cache name (required) * @return ApiResponse<CacheResult> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Flushed cache -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public ApiResponse flushCacheWithHttpInfo(String client, String cache) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'client' is set if (client == null) { throw new ApiException(400, "Missing the required parameter 'client' when calling flushCache"); } // verify the required parameter 'cache' is set if (cache == null) { throw new ApiException(400, "Missing the required parameter 'cache' when calling flushCache"); } // create path and map variables String localVarPath = "/caches/{client}/{cache}" .replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString())) .replaceAll("\\{" + "cache" + "\\}", apiClient.escapeString(cache.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = 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[] { "api", "jwt", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CacheServicesApi.flushCache", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * List cache entries * List cache entries * @param client Client name (required) * @param cache Cache name (required) * @return UserData * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Cache data -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public UserData getEntries(String client, String cache) throws ApiException { return getEntriesWithHttpInfo(client, cache).getData(); } /** * List cache entries * List cache entries * @param client Client name (required) * @param cache Cache name (required) * @return ApiResponse<UserData> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Cache data -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public ApiResponse getEntriesWithHttpInfo(String client, String cache) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'client' is set if (client == null) { throw new ApiException(400, "Missing the required parameter 'client' when calling getEntries"); } // verify the required parameter 'cache' is set if (cache == null) { throw new ApiException(400, "Missing the required parameter 'cache' when calling getEntries"); } // create path and map variables String localVarPath = "/caches/{client}/{cache}" .replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString())) .replaceAll("\\{" + "cache" + "\\}", apiClient.escapeString(cache.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = 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[] { "api", "jwt", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CacheServicesApi.getEntries", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get cache entry * Get cache entry * @param client Client name (required) * @param cache Cache name (required) * @param key Entry key (required) * @return UserData * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Cache data -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public UserData getEntry(String client, String cache, String key) throws ApiException { return getEntryWithHttpInfo(client, cache, key).getData(); } /** * Get cache entry * Get cache entry * @param client Client name (required) * @param cache Cache name (required) * @param key Entry key (required) * @return ApiResponse<UserData> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Cache data -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public ApiResponse getEntryWithHttpInfo(String client, String cache, String key) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'client' is set if (client == null) { throw new ApiException(400, "Missing the required parameter 'client' when calling getEntry"); } // verify the required parameter 'cache' is set if (cache == null) { throw new ApiException(400, "Missing the required parameter 'cache' when calling getEntry"); } // verify the required parameter 'key' is set if (key == null) { throw new ApiException(400, "Missing the required parameter 'key' when calling getEntry"); } // create path and map variables String localVarPath = "/caches/{client}/{cache}/{key}" .replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString())) .replaceAll("\\{" + "cache" + "\\}", apiClient.escapeString(cache.toString())) .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = 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[] { "api", "jwt", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CacheServicesApi.getEntry", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * List caches * Get caches using optional simple filters * @param client Client name (required) * @param local Include near or local caches (optional) * @return List<CacheResult> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Retrieved cache names -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public List listCaches(String client, String local) throws ApiException { return listCachesWithHttpInfo(client, local).getData(); } /** * List caches * Get caches using optional simple filters * @param client Client name (required) * @param local Include near or local caches (optional) * @return ApiResponse<List<CacheResult>> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Retrieved cache names -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public ApiResponse> listCachesWithHttpInfo(String client, String local) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'client' is set if (client == null) { throw new ApiException(400, "Missing the required parameter 'client' when calling listCaches"); } // create path and map variables String localVarPath = "/caches/{client}" .replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "local", local)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" }; GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI("CacheServicesApi.listCaches", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Put cache entry * Put cache entry * @param client Client name (required) * @param cache Cache name (required) * @param cacheRequest Cache Entry (required) * @return UserData * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Original value -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public UserData putEntry(String client, String cache, CacheRequest cacheRequest) throws ApiException { return putEntryWithHttpInfo(client, cache, cacheRequest).getData(); } /** * Put cache entry * Put cache entry * @param client Client name (required) * @param cache Cache name (required) * @param cacheRequest Cache Entry (required) * @return ApiResponse<UserData> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Original value -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not found -
500 Backend Error -
*/ public ApiResponse putEntryWithHttpInfo(String client, String cache, CacheRequest cacheRequest) throws ApiException { Object localVarPostBody = cacheRequest; // verify the required parameter 'client' is set if (client == null) { throw new ApiException(400, "Missing the required parameter 'client' when calling putEntry"); } // verify the required parameter 'cache' is set if (cache == null) { throw new ApiException(400, "Missing the required parameter 'cache' when calling putEntry"); } // verify the required parameter 'cacheRequest' is set if (cacheRequest == null) { throw new ApiException(400, "Missing the required parameter 'cacheRequest' when calling putEntry"); } // create path and map variables String localVarPath = "/caches/{client}/{cache}" .replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString())) .replaceAll("\\{" + "cache" + "\\}", apiClient.escapeString(cache.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = 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[] { "api", "jwt", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CacheServicesApi.putEntry", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy