From b2fb4547bdec4d213df053596eee91c94582a21d Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Tue, 14 Dec 2021 18:57:01 +0100 Subject: [PATCH 1/4] remove unused files and method --- .../.openapi-generator-ignore | 3 + .../com/algolia/ApiClient.java | 89 +- .../com/algolia/GzipRequestInterceptor.java | 80 - .../com/algolia/ServerConfiguration.java | 71 - .../com/algolia/ServerVariable.java | 27 - .../com/algolia/StringUtil.java | 69 - .../com/algolia/search/SearchApi.java | 2503 ++--------------- playground/java/pom.xml | 2 +- .../java/src/main/java/com/test/App.java | 6 +- templates/java/ServerConfiguration.mustache | 58 - templates/java/ServerVariable.mustache | 23 - .../okhttp-gson/ApiCallback.mustache | 2 - .../libraries/okhttp-gson/ApiClient.mustache | 91 +- .../GzipRequestInterceptor.mustache | 72 - .../java/libraries/okhttp-gson/api.mustache | 104 +- 15 files changed, 276 insertions(+), 2924 deletions(-) delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/GzipRequestInterceptor.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerConfiguration.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerVariable.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/StringUtil.java delete mode 100644 templates/java/ServerConfiguration.mustache delete mode 100644 templates/java/ServerVariable.mustache delete mode 100644 templates/java/libraries/okhttp-gson/GzipRequestInterceptor.mustache diff --git a/clients/algoliasearch-client-java-2/.openapi-generator-ignore b/clients/algoliasearch-client-java-2/.openapi-generator-ignore index ba2a2732751..dd94f3e8b53 100644 --- a/clients/algoliasearch-client-java-2/.openapi-generator-ignore +++ b/clients/algoliasearch-client-java-2/.openapi-generator-ignore @@ -19,3 +19,6 @@ settings.gradle # Selective source file algoliasearch-core/com/algolia/auth/** algoliasearch-core/com/algolia/Configuration.java +algoliasearch-core/com/algolia/Server*.java +algoliasearch-core/com/algolia/StringUtil.java +algoliasearch-core/com/algolia/GzipRequestInterceptor.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java index 6bca7ae6f29..4d71840f372 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java @@ -30,15 +30,11 @@ public class ApiClient { private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); private String basePath; private String appId, apiKey; private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; private InputStream sslCaCert; private boolean verifyingSsl; @@ -207,18 +203,6 @@ public ApiClient addDefaultHeader(String key, String value) { return this; } - /** - * Add a default cookie. - * - * @param key The cookie's key - * @param value The cookie's value - * @return ApiClient - */ - public ApiClient addDefaultCookie(String key, String value) { - defaultCookieMap.put(key, value); - return this; - } - /** * Check that whether debugging is enabled for this API client. * @@ -515,7 +499,11 @@ public String selectHeaderAccept(String[] accepts) { return accept; } } - return StringUtil.join(accepts, ","); + StringJoiner joiner = new StringJoiner(","); + for (String s : accepts) { + joiner.add(s); + } + return joiner.toString(); } /** @@ -812,9 +800,6 @@ public T handleResponse(Response response, Type returnType) * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call * @throws ApiException If fail to serialize the request body object @@ -826,9 +811,6 @@ public Call buildCall( List collectionQueryParams, Object body, Map headerParams, - Map cookieParams, - Map formParams, - String[] authNames, ApiCallback callback ) throws ApiException { Request request = buildRequest( @@ -838,9 +820,6 @@ public Call buildCall( collectionQueryParams, body, headerParams, - cookieParams, - formParams, - authNames, callback ); @@ -857,9 +836,6 @@ public Call buildCall( * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request * @throws ApiException If fail to serialize the request body object @@ -871,17 +847,14 @@ public Request buildRequest( List collectionQueryParams, Object body, Map headerParams, - Map cookieParams, - Map formParams, - String[] authNames, ApiCallback callback ) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + headerParams.put("X-Algolia-Application-Id", this.appId); + headerParams.put("X-Algolia-API-Key", this.apiKey); final String url = buildUrl(path, queryParams, collectionQueryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); String contentType = (String) headerParams.get("Content-Type"); // ensuring a default content type @@ -892,10 +865,6 @@ public Request buildRequest( RequestBody reqBody; if (!HttpMethod.permitsRequestBody(method)) { reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentType)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentType)) { - reqBody = buildRequestBodyMultipart(formParams); } else if (body == null) { if ("DELETE".equals(method)) { // allow calling DELETE without sending a request body @@ -1006,50 +975,6 @@ public void processHeaderParams( } } - /** - * Set cookie parameters to the request builder, including default cookies. - * - * @param cookieParams Cookie parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processCookieParams( - Map cookieParams, - Request.Builder reqBuilder - ) { - for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader( - "Cookie", - String.format("%s=%s", param.getKey(), param.getValue()) - ); - } - for (Entry param : defaultCookieMap.entrySet()) { - if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader( - "Cookie", - String.format("%s=%s", param.getKey(), param.getValue()) - ); - } - } - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - */ - public void updateParamsForAuth( - String[] authNames, - List queryParams, - Map headerParams, - Map cookieParams - ) { - headerParams.put("X-Algolia-Application-Id", this.appId); - headerParams.put("X-Algolia-API-Key", this.apiKey); - } - /** * Build a form-encoding request body with the given form parameters. * diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/GzipRequestInterceptor.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/GzipRequestInterceptor.java deleted file mode 100644 index 3a054245399..00000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/GzipRequestInterceptor.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.algolia; - -import java.io.IOException; -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -/** - * Encodes request bodies using gzip. - * - *

Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if ( - originalRequest.body() == null || - originalRequest.header("Content-Encoding") != null - ) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest - .newBuilder() - .header("Content-Encoding", "gzip") - .method( - originalRequest.method(), - forceContentLength(gzip(originalRequest.body())) - ) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) - throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerConfiguration.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerConfiguration.java deleted file mode 100644 index 2079f056c98..00000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerConfiguration.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.algolia; - -import java.util.Map; - -/** Representing a Server configuration. */ -public class ServerConfiguration { - - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for - * substitution in the server's URL template. - */ - public ServerConfiguration( - String URL, - String description, - Map variables - ) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable : this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if ( - serverVariable.enumValues.size() > 0 && - !serverVariable.enumValues.contains(value) - ) { - throw new RuntimeException( - "The variable " + - name + - " in the server URL has invalid value " + - value + - "." - ); - } - } - url = url.replaceAll("\\{" + name + "\\}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerVariable.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerVariable.java deleted file mode 100644 index c0e8b2aa675..00000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerVariable.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.algolia; - -import java.util.HashSet; - -/** Representing a Server Variable for server URL template substitution. */ -public class ServerVariable { - - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are - * from a limited set. - */ - public ServerVariable( - String description, - String defaultValue, - HashSet enumValues - ) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/StringUtil.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/StringUtil.java deleted file mode 100644 index af841ec05cd..00000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/StringUtil.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.algolia; - -import java.util.Collection; -import java.util.Iterator; - -public class StringUtil { - - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - * - *

Note: This might be replaced by utility method from commons-lang or guava someday if one of - * those libraries is added as dependency. - * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java index 05a26a42ca4..dad5d9398dd 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java @@ -100,8 +100,6 @@ public okhttp3.Call addApiKeyCall(ApiKey apiKey, final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -114,7 +112,6 @@ public okhttp3.Call addApiKeyCall(ApiKey apiKey, final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -122,9 +119,6 @@ public okhttp3.Call addApiKeyCall(ApiKey apiKey, final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -141,8 +135,7 @@ private okhttp3.Call addApiKeyValidateBeforeCall( ); } - okhttp3.Call localVarCall = addApiKeyCall(apiKey, _callback); - return localVarCall; + return addApiKeyCall(apiKey, _callback); } /** @@ -163,32 +156,11 @@ private okhttp3.Call addApiKeyValidateBeforeCall( * */ public AddApiKeyResponse addApiKey(ApiKey apiKey) throws ApiException { - ApiResponse localVarResp = addApiKeyWithHttpInfo(apiKey); - return localVarResp.getData(); - } - - /** - * Create a new API key. Add a new API Key with specific permissions/restrictions. - * - * @param apiKey (required) - * @return ApiResponse<AddApiKeyResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse addApiKeyWithHttpInfo(ApiKey apiKey) - throws ApiException { okhttp3.Call localVarCall = addApiKeyValidateBeforeCall(apiKey, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -260,8 +232,6 @@ public okhttp3.Call addOrUpdateObjectCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -274,7 +244,6 @@ public okhttp3.Call addOrUpdateObjectCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "PUT", @@ -282,9 +251,6 @@ public okhttp3.Call addOrUpdateObjectCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -317,13 +283,7 @@ private okhttp3.Call addOrUpdateObjectValidateBeforeCall( ); } - okhttp3.Call localVarCall = addOrUpdateObjectCall( - indexName, - objectID, - requestBody, - _callback - ); - return localVarCall; + return addOrUpdateObjectCall(indexName, objectID, requestBody, _callback); } /** @@ -351,40 +311,6 @@ public UpdatedAtWithObjectIdResponse addOrUpdateObject( String indexName, String objectID, Map requestBody - ) throws ApiException { - ApiResponse localVarResp = addOrUpdateObjectWithHttpInfo( - indexName, - objectID, - requestBody - ); - return localVarResp.getData(); - } - - /** - * Add or replace an object with a given object ID. Add or replace an object with a given object - * ID. If the object does not exist, it will be created. If it already exists, it will be - * replaced. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param requestBody The Algolia object. (required) - * @return ApiResponse<UpdatedAtWithObjectIdResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse addOrUpdateObjectWithHttpInfo( - String indexName, - String objectID, - Map requestBody ) throws ApiException { okhttp3.Call localVarCall = addOrUpdateObjectValidateBeforeCall( indexName, @@ -394,7 +320,9 @@ public ApiResponse addOrUpdateObjectWithHttpInfo( ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -461,8 +389,6 @@ public okhttp3.Call appendSourceCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -475,7 +401,6 @@ public okhttp3.Call appendSourceCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -483,9 +408,6 @@ public okhttp3.Call appendSourceCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -502,8 +424,7 @@ private okhttp3.Call appendSourceValidateBeforeCall( ); } - okhttp3.Call localVarCall = appendSourceCall(source, _callback); - return localVarCall; + return appendSourceCall(source, _callback); } /** @@ -520,30 +441,11 @@ private okhttp3.Call appendSourceValidateBeforeCall( * */ public CreatedAtResponse appendSource(Source source) throws ApiException { - ApiResponse localVarResp = appendSourceWithHttpInfo( - source - ); - return localVarResp.getData(); - } - - /** - * Add a single source to the list of allowed sources. - * - * @param source The source to add. (required) - * @return ApiResponse<CreatedAtResponse> - * @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 appendSourceWithHttpInfo(Source source) - throws ApiException { okhttp3.Call localVarCall = appendSourceValidateBeforeCall(source, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -603,8 +505,6 @@ public okhttp3.Call assignUserIdCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (xAlgoliaUserID != null) { localVarQueryParams.addAll( @@ -623,7 +523,6 @@ public okhttp3.Call assignUserIdCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -631,9 +530,6 @@ public okhttp3.Call assignUserIdCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -658,12 +554,7 @@ private okhttp3.Call assignUserIdValidateBeforeCall( ); } - okhttp3.Call localVarCall = assignUserIdCall( - xAlgoliaUserID, - assignUserIdObject, - _callback - ); - return localVarCall; + return assignUserIdCall(xAlgoliaUserID, assignUserIdObject, _callback); } /** @@ -690,38 +581,6 @@ private okhttp3.Call assignUserIdValidateBeforeCall( public CreatedAtResponse assignUserId( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject - ) throws ApiException { - ApiResponse localVarResp = assignUserIdWithHttpInfo( - xAlgoliaUserID, - assignUserIdObject - ); - return localVarResp.getData(); - } - - /** - * Assign or Move userID Assign or Move a userID to a cluster. The time it takes to migrate (move) - * a user is proportional to the amount of data linked to the userID. Upon success, the response - * is 200 OK. A successful response indicates that the operation has been taken into account, and - * the userID is directly usable. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdObject (required) - * @return ApiResponse<CreatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse assignUserIdWithHttpInfo( - Object xAlgoliaUserID, - AssignUserIdObject assignUserIdObject ) throws ApiException { okhttp3.Call localVarCall = assignUserIdValidateBeforeCall( xAlgoliaUserID, @@ -729,7 +588,9 @@ public ApiResponse assignUserIdWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -803,8 +664,6 @@ public okhttp3.Call batchCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -817,7 +676,6 @@ public okhttp3.Call batchCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -825,9 +683,6 @@ public okhttp3.Call batchCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -852,12 +707,7 @@ private okhttp3.Call batchValidateBeforeCall( ); } - okhttp3.Call localVarCall = batchCall( - indexName, - batchWriteObject, - _callback - ); - return localVarCall; + return batchCall(indexName, batchWriteObject, _callback); } /** @@ -881,35 +731,6 @@ private okhttp3.Call batchValidateBeforeCall( public BatchResponse batch( String indexName, BatchWriteObject batchWriteObject - ) throws ApiException { - ApiResponse localVarResp = batchWithHttpInfo( - indexName, - batchWriteObject - ); - return localVarResp.getData(); - } - - /** - * Performs multiple write operations in a single API call. - * - * @param indexName The index in which to perform the request. (required) - * @param batchWriteObject (required) - * @return ApiResponse<BatchResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse batchWithHttpInfo( - String indexName, - BatchWriteObject batchWriteObject ) throws ApiException { okhttp3.Call localVarCall = batchValidateBeforeCall( indexName, @@ -917,7 +738,9 @@ public ApiResponse batchWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -984,8 +807,6 @@ public okhttp3.Call batchAssignUserIdsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (xAlgoliaUserID != null) { localVarQueryParams.addAll( @@ -1004,7 +825,6 @@ public okhttp3.Call batchAssignUserIdsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -1012,9 +832,6 @@ public okhttp3.Call batchAssignUserIdsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -1040,12 +857,11 @@ private okhttp3.Call batchAssignUserIdsValidateBeforeCall( ); } - okhttp3.Call localVarCall = batchAssignUserIdsCall( + return batchAssignUserIdsCall( xAlgoliaUserID, batchAssignUserIdsObject, _callback ); - return localVarCall; } /** @@ -1071,37 +887,6 @@ private okhttp3.Call batchAssignUserIdsValidateBeforeCall( public CreatedAtResponse batchAssignUserIds( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject - ) throws ApiException { - ApiResponse localVarResp = batchAssignUserIdsWithHttpInfo( - xAlgoliaUserID, - batchAssignUserIdsObject - ); - return localVarResp.getData(); - } - - /** - * Batch assign userIDs Assign multiple userIDs to a cluster. Upon success, the response is 200 - * OK. A successful response indicates that the operation has been taken into account, and the - * userIDs are directly usable. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsObject (required) - * @return ApiResponse<CreatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse batchAssignUserIdsWithHttpInfo( - Object xAlgoliaUserID, - BatchAssignUserIdsObject batchAssignUserIdsObject ) throws ApiException { okhttp3.Call localVarCall = batchAssignUserIdsValidateBeforeCall( xAlgoliaUserID, @@ -1109,7 +894,9 @@ public ApiResponse batchAssignUserIdsWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -1182,8 +969,6 @@ public okhttp3.Call batchDictionaryEntriesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -1196,7 +981,6 @@ public okhttp3.Call batchDictionaryEntriesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -1204,9 +988,6 @@ public okhttp3.Call batchDictionaryEntriesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -1233,12 +1014,11 @@ private okhttp3.Call batchDictionaryEntriesValidateBeforeCall( ); } - okhttp3.Call localVarCall = batchDictionaryEntriesCall( + return batchDictionaryEntriesCall( dictionaryName, batchDictionaryEntries, _callback ); - return localVarCall; } /** @@ -1262,35 +1042,6 @@ private okhttp3.Call batchDictionaryEntriesValidateBeforeCall( public UpdatedAtResponse batchDictionaryEntries( String dictionaryName, BatchDictionaryEntries batchDictionaryEntries - ) throws ApiException { - ApiResponse localVarResp = batchDictionaryEntriesWithHttpInfo( - dictionaryName, - batchDictionaryEntries - ); - return localVarResp.getData(); - } - - /** - * Send a batch of dictionary entries. Send a batch of dictionary entries. - * - * @param dictionaryName The dictionary to search in. (required) - * @param batchDictionaryEntries (required) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse batchDictionaryEntriesWithHttpInfo( - String dictionaryName, - BatchDictionaryEntries batchDictionaryEntries ) throws ApiException { okhttp3.Call localVarCall = batchDictionaryEntriesValidateBeforeCall( dictionaryName, @@ -1298,7 +1049,9 @@ public ApiResponse batchDictionaryEntriesWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -1375,8 +1128,6 @@ public okhttp3.Call batchRulesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -1401,7 +1152,6 @@ public okhttp3.Call batchRulesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -1409,9 +1159,6 @@ public okhttp3.Call batchRulesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -1438,14 +1185,13 @@ private okhttp3.Call batchRulesValidateBeforeCall( ); } - okhttp3.Call localVarCall = batchRulesCall( + return batchRulesCall( indexName, rule, forwardToReplicas, clearExistingRules, _callback ); - return localVarCall; } /** @@ -1475,43 +1221,6 @@ public UpdatedAtResponse batchRules( List rule, Boolean forwardToReplicas, Boolean clearExistingRules - ) throws ApiException { - ApiResponse localVarResp = batchRulesWithHttpInfo( - indexName, - rule, - forwardToReplicas, - clearExistingRules - ); - return localVarResp.getData(); - } - - /** - * Batch Rules. Create or update a batch of Rules. - * - * @param indexName The index in which to perform the request. (required) - * @param rule (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @param clearExistingRules When true, existing Rules are cleared before adding this batch. When - * false, existing Rules are kept. (optional) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse batchRulesWithHttpInfo( - String indexName, - List rule, - Boolean forwardToReplicas, - Boolean clearExistingRules ) throws ApiException { okhttp3.Call localVarCall = batchRulesValidateBeforeCall( indexName, @@ -1521,7 +1230,9 @@ public ApiResponse batchRulesWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -1600,8 +1311,6 @@ public okhttp3.Call browseCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -1614,7 +1323,6 @@ public okhttp3.Call browseCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -1622,9 +1330,6 @@ public okhttp3.Call browseCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -1642,8 +1347,7 @@ private okhttp3.Call browseValidateBeforeCall( ); } - okhttp3.Call localVarCall = browseCall(indexName, browseRequest, _callback); - return localVarCall; + return browseCall(indexName, browseRequest, _callback); } /** @@ -1672,48 +1376,15 @@ private okhttp3.Call browseValidateBeforeCall( */ public BrowseResponse browse(String indexName, BrowseRequest browseRequest) throws ApiException { - ApiResponse localVarResp = browseWithHttpInfo( - indexName, - browseRequest - ); - return localVarResp.getData(); - } - - /** - * Retrieve all index content. This method allows you to retrieve all index content. It can - * retrieve up to 1,000 records per call and supports full text search and filters. For - * performance reasons, some features are not supported, including `distinct`, sorting by `typos`, - * `words` or `geo distance`. When there is more content to be browsed, the response contains a - * cursor field. This cursor has to be passed to the subsequent call to browse in order to get the - * next page of results. When the end of the index has been reached, the cursor field is absent - * from the response. - * - * @param indexName The index in which to perform the request. (required) - * @param browseRequest (optional) - * @return ApiResponse<BrowseResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse browseWithHttpInfo( - String indexName, - BrowseRequest browseRequest - ) throws ApiException { okhttp3.Call localVarCall = browseValidateBeforeCall( indexName, browseRequest, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -1791,8 +1462,6 @@ public okhttp3.Call clearAllSynonymsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -1812,7 +1481,6 @@ public okhttp3.Call clearAllSynonymsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -1820,9 +1488,6 @@ public okhttp3.Call clearAllSynonymsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -1840,12 +1505,7 @@ private okhttp3.Call clearAllSynonymsValidateBeforeCall( ); } - okhttp3.Call localVarCall = clearAllSynonymsCall( - indexName, - forwardToReplicas, - _callback - ); - return localVarCall; + return clearAllSynonymsCall(indexName, forwardToReplicas, _callback); } /** @@ -1871,43 +1531,15 @@ public UpdatedAtResponse clearAllSynonyms( String indexName, Boolean forwardToReplicas ) throws ApiException { - ApiResponse localVarResp = clearAllSynonymsWithHttpInfo( + okhttp3.Call localVarCall = clearAllSynonymsValidateBeforeCall( indexName, - forwardToReplicas - ); - return localVarResp.getData(); - } - - /** - * Clear all synonyms. Remove all synonyms from an index. - * - * @param indexName The index in which to perform the request. (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse clearAllSynonymsWithHttpInfo( - String indexName, - Boolean forwardToReplicas - ) throws ApiException { - okhttp3.Call localVarCall = clearAllSynonymsValidateBeforeCall( - indexName, - forwardToReplicas, - null + forwardToReplicas, + null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -1977,8 +1609,6 @@ public okhttp3.Call clearObjectsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -1992,7 +1622,6 @@ public okhttp3.Call clearObjectsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -2000,9 +1629,6 @@ public okhttp3.Call clearObjectsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -2019,8 +1645,7 @@ private okhttp3.Call clearObjectsValidateBeforeCall( ); } - okhttp3.Call localVarCall = clearObjectsCall(indexName, _callback); - return localVarCall; + return clearObjectsCall(indexName, _callback); } /** @@ -2042,36 +1667,11 @@ private okhttp3.Call clearObjectsValidateBeforeCall( * */ public UpdatedAtResponse clearObjects(String indexName) throws ApiException { - ApiResponse localVarResp = clearObjectsWithHttpInfo( - indexName - ); - return localVarResp.getData(); - } - - /** - * clear all objects from an index. Delete an index's content, but leave settings and - * index-specific API keys untouched. - * - * @param indexName The index in which to perform the request. (required) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse clearObjectsWithHttpInfo( - String indexName - ) throws ApiException { okhttp3.Call localVarCall = clearObjectsValidateBeforeCall(indexName, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -2141,8 +1741,6 @@ public okhttp3.Call clearRulesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -2162,7 +1760,6 @@ public okhttp3.Call clearRulesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -2170,9 +1767,6 @@ public okhttp3.Call clearRulesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -2190,12 +1784,7 @@ private okhttp3.Call clearRulesValidateBeforeCall( ); } - okhttp3.Call localVarCall = clearRulesCall( - indexName, - forwardToReplicas, - _callback - ); - return localVarCall; + return clearRulesCall(indexName, forwardToReplicas, _callback); } /** @@ -2220,36 +1809,6 @@ private okhttp3.Call clearRulesValidateBeforeCall( public UpdatedAtResponse clearRules( String indexName, Boolean forwardToReplicas - ) throws ApiException { - ApiResponse localVarResp = clearRulesWithHttpInfo( - indexName, - forwardToReplicas - ); - return localVarResp.getData(); - } - - /** - * Clear Rules. Delete all Rules in the index. - * - * @param indexName The index in which to perform the request. (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse clearRulesWithHttpInfo( - String indexName, - Boolean forwardToReplicas ) throws ApiException { okhttp3.Call localVarCall = clearRulesValidateBeforeCall( indexName, @@ -2257,7 +1816,9 @@ public ApiResponse clearRulesWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -2325,8 +1886,6 @@ public okhttp3.Call deleteApiKeyCall(String key, final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -2340,7 +1899,6 @@ public okhttp3.Call deleteApiKeyCall(String key, final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "DELETE", @@ -2348,9 +1906,6 @@ public okhttp3.Call deleteApiKeyCall(String key, final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -2367,8 +1922,7 @@ private okhttp3.Call deleteApiKeyValidateBeforeCall( ); } - okhttp3.Call localVarCall = deleteApiKeyCall(key, _callback); - return localVarCall; + return deleteApiKeyCall(key, _callback); } /** @@ -2389,35 +1943,12 @@ private okhttp3.Call deleteApiKeyValidateBeforeCall( * */ public DeleteApiKeyResponse deleteApiKey(String key) throws ApiException { - ApiResponse localVarResp = deleteApiKeyWithHttpInfo( - key - ); - return localVarResp.getData(); - } - - /** - * Delete an API key. Delete an existing API Key. - * - * @param key API Key string. (required) - * @return ApiResponse<DeleteApiKeyResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse deleteApiKeyWithHttpInfo(String key) - throws ApiException { okhttp3.Call localVarCall = deleteApiKeyValidateBeforeCall(key, null); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -2483,8 +2014,6 @@ public okhttp3.Call deleteByCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -2497,7 +2026,6 @@ public okhttp3.Call deleteByCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -2505,9 +2033,6 @@ public okhttp3.Call deleteByCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -2532,12 +2057,7 @@ private okhttp3.Call deleteByValidateBeforeCall( ); } - okhttp3.Call localVarCall = deleteByCall( - indexName, - searchParams, - _callback - ); - return localVarCall; + return deleteByCall(indexName, searchParams, _callback); } /** @@ -2563,37 +2083,6 @@ private okhttp3.Call deleteByValidateBeforeCall( public DeletedAtResponse deleteBy( String indexName, SearchParams searchParams - ) throws ApiException { - ApiResponse localVarResp = deleteByWithHttpInfo( - indexName, - searchParams - ); - return localVarResp.getData(); - } - - /** - * Delete all records matching the query. Remove all objects matching a filter (including geo - * filters). This method enables you to delete one or more objects based on filters (numeric, - * facet, tag or geo queries). It doesn't accept empty filters or a query. - * - * @param indexName The index in which to perform the request. (required) - * @param searchParams (required) - * @return ApiResponse<DeletedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse deleteByWithHttpInfo( - String indexName, - SearchParams searchParams ) throws ApiException { okhttp3.Call localVarCall = deleteByValidateBeforeCall( indexName, @@ -2601,7 +2090,9 @@ public ApiResponse deleteByWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -2672,8 +2163,6 @@ public okhttp3.Call deleteIndexCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -2687,7 +2176,6 @@ public okhttp3.Call deleteIndexCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "DELETE", @@ -2695,9 +2183,6 @@ public okhttp3.Call deleteIndexCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -2714,8 +2199,7 @@ private okhttp3.Call deleteIndexValidateBeforeCall( ); } - okhttp3.Call localVarCall = deleteIndexCall(indexName, _callback); - return localVarCall; + return deleteIndexCall(indexName, _callback); } /** @@ -2736,35 +2220,11 @@ private okhttp3.Call deleteIndexValidateBeforeCall( * */ public DeletedAtResponse deleteIndex(String indexName) throws ApiException { - ApiResponse localVarResp = deleteIndexWithHttpInfo( - indexName - ); - return localVarResp.getData(); - } - - /** - * Delete index. Delete an existing index. - * - * @param indexName The index in which to perform the request. (required) - * @return ApiResponse<DeletedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse deleteIndexWithHttpInfo( - String indexName - ) throws ApiException { okhttp3.Call localVarCall = deleteIndexValidateBeforeCall(indexName, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -2836,8 +2296,6 @@ public okhttp3.Call deleteObjectCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -2851,7 +2309,6 @@ public okhttp3.Call deleteObjectCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "DELETE", @@ -2859,9 +2316,6 @@ public okhttp3.Call deleteObjectCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -2886,12 +2340,7 @@ private okhttp3.Call deleteObjectValidateBeforeCall( ); } - okhttp3.Call localVarCall = deleteObjectCall( - indexName, - objectID, - _callback - ); - return localVarCall; + return deleteObjectCall(indexName, objectID, _callback); } /** @@ -2914,42 +2363,15 @@ private okhttp3.Call deleteObjectValidateBeforeCall( */ public DeletedAtResponse deleteObject(String indexName, String objectID) throws ApiException { - ApiResponse localVarResp = deleteObjectWithHttpInfo( - indexName, - objectID - ); - return localVarResp.getData(); - } - - /** - * Delete object. Delete an existing object. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @return ApiResponse<DeletedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse deleteObjectWithHttpInfo( - String indexName, - String objectID - ) throws ApiException { okhttp3.Call localVarCall = deleteObjectValidateBeforeCall( indexName, objectID, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -3027,8 +2449,6 @@ public okhttp3.Call deleteRuleCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -3048,7 +2468,6 @@ public okhttp3.Call deleteRuleCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "DELETE", @@ -3056,9 +2475,6 @@ public okhttp3.Call deleteRuleCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -3084,13 +2500,7 @@ private okhttp3.Call deleteRuleValidateBeforeCall( ); } - okhttp3.Call localVarCall = deleteRuleCall( - indexName, - objectID, - forwardToReplicas, - _callback - ); - return localVarCall; + return deleteRuleCall(indexName, objectID, forwardToReplicas, _callback); } /** @@ -3117,39 +2527,6 @@ public UpdatedAtResponse deleteRule( String indexName, String objectID, Boolean forwardToReplicas - ) throws ApiException { - ApiResponse localVarResp = deleteRuleWithHttpInfo( - indexName, - objectID, - forwardToReplicas - ); - return localVarResp.getData(); - } - - /** - * Delete a rule. Delete the Rule with the specified objectID. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse deleteRuleWithHttpInfo( - String indexName, - String objectID, - Boolean forwardToReplicas ) throws ApiException { okhttp3.Call localVarCall = deleteRuleValidateBeforeCall( indexName, @@ -3158,7 +2535,9 @@ public ApiResponse deleteRuleWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -3227,8 +2606,6 @@ public okhttp3.Call deleteSourceCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -3242,7 +2619,6 @@ public okhttp3.Call deleteSourceCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "DELETE", @@ -3250,9 +2626,6 @@ public okhttp3.Call deleteSourceCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -3269,8 +2642,7 @@ private okhttp3.Call deleteSourceValidateBeforeCall( ); } - okhttp3.Call localVarCall = deleteSourceCall(source, _callback); - return localVarCall; + return deleteSourceCall(source, _callback); } /** @@ -3287,32 +2659,12 @@ private okhttp3.Call deleteSourceValidateBeforeCall( * */ public DeleteSourceResponse deleteSource(String source) throws ApiException { - ApiResponse localVarResp = deleteSourceWithHttpInfo( - source - ); - return localVarResp.getData(); - } - - /** - * Remove a single source from the list of allowed sources. - * - * @param source The IP range of the source. (required) - * @return ApiResponse<DeleteSourceResponse> - * @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 deleteSourceWithHttpInfo( - String source - ) throws ApiException { okhttp3.Call localVarCall = deleteSourceValidateBeforeCall(source, null); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -3384,8 +2736,6 @@ public okhttp3.Call deleteSynonymCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -3405,7 +2755,6 @@ public okhttp3.Call deleteSynonymCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "DELETE", @@ -3413,9 +2762,6 @@ public okhttp3.Call deleteSynonymCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -3441,13 +2787,7 @@ private okhttp3.Call deleteSynonymValidateBeforeCall( ); } - okhttp3.Call localVarCall = deleteSynonymCall( - indexName, - objectID, - forwardToReplicas, - _callback - ); - return localVarCall; + return deleteSynonymCall(indexName, objectID, forwardToReplicas, _callback); } /** @@ -3475,24 +2815,29 @@ public DeletedAtResponse deleteSynonym( String objectID, Boolean forwardToReplicas ) throws ApiException { - ApiResponse localVarResp = deleteSynonymWithHttpInfo( + okhttp3.Call localVarCall = deleteSynonymValidateBeforeCall( indexName, objectID, - forwardToReplicas + forwardToReplicas, + null ); - return localVarResp.getData(); + Type localVarReturnType = new TypeToken() {}.getType(); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** - * Delete synonym. Delete a single synonyms set, identified by the given objectID. + * Delete synonym. (asynchronously) Delete a single synonyms set, identified by the given + * objectID. * * @param indexName The index in which to perform the request. (required) * @param objectID Unique identifier of an object. (required) * @param forwardToReplicas When true, changes are also propagated to replicas of the given * indexName. (optional) - * @return ApiResponse<DeletedAtResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @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 * * @@ -3503,53 +2848,17 @@ public DeletedAtResponse deleteSynonym( * *
Status Code Description Response Headers
404 Index not found. -
*/ - public ApiResponse deleteSynonymWithHttpInfo( + public okhttp3.Call deleteSynonymAsync( String indexName, String objectID, - Boolean forwardToReplicas + Boolean forwardToReplicas, + final ApiCallback _callback ) throws ApiException { okhttp3.Call localVarCall = deleteSynonymValidateBeforeCall( indexName, objectID, forwardToReplicas, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); - } - - /** - * Delete synonym. (asynchronously) Delete a single synonyms set, identified by the given - * objectID. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteSynonymAsync( - String indexName, - String objectID, - Boolean forwardToReplicas, - final ApiCallback _callback - ) throws ApiException { - okhttp3.Call localVarCall = deleteSynonymValidateBeforeCall( - indexName, - objectID, - forwardToReplicas, - _callback + _callback ); Type localVarReturnType = new TypeToken() {}.getType(); this.executeAsync(localVarCall, localVarReturnType, _callback); @@ -3587,8 +2896,6 @@ public okhttp3.Call getApiKeyCall(String key, final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -3602,7 +2909,6 @@ public okhttp3.Call getApiKeyCall(String key, final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -3610,9 +2916,6 @@ public okhttp3.Call getApiKeyCall(String key, final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -3629,8 +2932,7 @@ private okhttp3.Call getApiKeyValidateBeforeCall( ); } - okhttp3.Call localVarCall = getApiKeyCall(key, _callback); - return localVarCall; + return getApiKeyCall(key, _callback); } /** @@ -3651,32 +2953,10 @@ private okhttp3.Call getApiKeyValidateBeforeCall( * */ public KeyObject getApiKey(String key) throws ApiException { - ApiResponse localVarResp = getApiKeyWithHttpInfo(key); - return localVarResp.getData(); - } - - /** - * Get an API key. Get the permissions of an API key. - * - * @param key API Key string. (required) - * @return ApiResponse<KeyObject> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getApiKeyWithHttpInfo(String key) - throws ApiException { okhttp3.Call localVarCall = getApiKeyValidateBeforeCall(key, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -3732,8 +3012,6 @@ public okhttp3.Call getDictionaryLanguagesCall(final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -3747,7 +3025,6 @@ public okhttp3.Call getDictionaryLanguagesCall(final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -3755,9 +3032,6 @@ public okhttp3.Call getDictionaryLanguagesCall(final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -3766,8 +3040,7 @@ public okhttp3.Call getDictionaryLanguagesCall(final ApiCallback _callback) private okhttp3.Call getDictionaryLanguagesValidateBeforeCall( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getDictionaryLanguagesCall(_callback); - return localVarCall; + return getDictionaryLanguagesCall(_callback); } /** @@ -3787,32 +3060,12 @@ private okhttp3.Call getDictionaryLanguagesValidateBeforeCall( * */ public Map getDictionaryLanguages() throws ApiException { - ApiResponse> localVarResp = getDictionaryLanguagesWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List dictionaries supported per language. List dictionaries supported per language. - * - * @return ApiResponse<Map<String, Languages>> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse> getDictionaryLanguagesWithHttpInfo() - throws ApiException { okhttp3.Call localVarCall = getDictionaryLanguagesValidateBeforeCall(null); Type localVarReturnType = new TypeToken>() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse> res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -3870,8 +3123,6 @@ public okhttp3.Call getDictionarySettingsCall(final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -3885,7 +3136,6 @@ public okhttp3.Call getDictionarySettingsCall(final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -3893,9 +3143,6 @@ public okhttp3.Call getDictionarySettingsCall(final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -3904,8 +3151,7 @@ public okhttp3.Call getDictionarySettingsCall(final ApiCallback _callback) private okhttp3.Call getDictionarySettingsValidateBeforeCall( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getDictionarySettingsCall(_callback); - return localVarCall; + return getDictionarySettingsCall(_callback); } /** @@ -3926,34 +3172,13 @@ private okhttp3.Call getDictionarySettingsValidateBeforeCall( * */ public GetDictionarySettingsResponse getDictionarySettings() - throws ApiException { - ApiResponse localVarResp = getDictionarySettingsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Retrieve dictionaries settings. The API stores languages whose standard entries are disabled. - * Fetch settings does not return false values. Retrieve dictionaries settings. - * - * @return ApiResponse<GetDictionarySettingsResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getDictionarySettingsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getDictionarySettingsValidateBeforeCall(null); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -4024,8 +3249,6 @@ public okhttp3.Call getLogsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (offset != null) { localVarQueryParams.addAll(this.parameterToPair("offset", offset)); @@ -4055,7 +3278,6 @@ public okhttp3.Call getLogsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -4063,9 +3285,6 @@ public okhttp3.Call getLogsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -4078,14 +3297,7 @@ private okhttp3.Call getLogsValidateBeforeCall( String type, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getLogsCall( - offset, - length, - indexName, - type, - _callback - ); - return localVarCall; + return getLogsCall(offset, length, indexName, type, _callback); } /** @@ -4117,45 +3329,6 @@ public GetLogsResponse getLogs( Integer length, String indexName, String type - ) throws ApiException { - ApiResponse localVarResp = getLogsWithHttpInfo( - offset, - length, - indexName, - type - ); - return localVarResp.getData(); - } - - /** - * Return the lastest log entries. - * - * @param offset First entry to retrieve (zero-based). Log entries are sorted by decreasing date, - * therefore 0 designates the most recent log entry. (optional, default to 0) - * @param length Maximum number of entries to retrieve. The maximum allowed value is 1000. - * (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved across all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. - * (optional, default to all) - * @return ApiResponse<GetLogsResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getLogsWithHttpInfo( - Integer offset, - Integer length, - String indexName, - String type ) throws ApiException { okhttp3.Call localVarCall = getLogsValidateBeforeCall( offset, @@ -4165,7 +3338,9 @@ public ApiResponse getLogsWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -4252,8 +3427,6 @@ public okhttp3.Call getObjectCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (attributesToRetrieve != null) { localVarCollectionQueryParams.addAll( @@ -4277,7 +3450,6 @@ public okhttp3.Call getObjectCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -4285,9 +3457,6 @@ public okhttp3.Call getObjectCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -4313,13 +3482,7 @@ private okhttp3.Call getObjectValidateBeforeCall( ); } - okhttp3.Call localVarCall = getObjectCall( - indexName, - objectID, - attributesToRetrieve, - _callback - ); - return localVarCall; + return getObjectCall(indexName, objectID, attributesToRetrieve, _callback); } /** @@ -4345,38 +3508,6 @@ public Map getObject( String indexName, String objectID, List attributesToRetrieve - ) throws ApiException { - ApiResponse> localVarResp = getObjectWithHttpInfo( - indexName, - objectID, - attributesToRetrieve - ); - return localVarResp.getData(); - } - - /** - * Retrieve one object from the index. Retrieve one object from the index. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param attributesToRetrieve (optional) - * @return ApiResponse<Map<String, String>> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse> getObjectWithHttpInfo( - String indexName, - String objectID, - List attributesToRetrieve ) throws ApiException { okhttp3.Call localVarCall = getObjectValidateBeforeCall( indexName, @@ -4385,7 +3516,9 @@ public ApiResponse> getObjectWithHttpInfo( null ); Type localVarReturnType = new TypeToken>() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse> res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -4453,8 +3586,6 @@ public okhttp3.Call getObjectsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -4467,7 +3598,6 @@ public okhttp3.Call getObjectsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -4475,9 +3605,6 @@ public okhttp3.Call getObjectsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -4494,8 +3621,7 @@ private okhttp3.Call getObjectsValidateBeforeCall( ); } - okhttp3.Call localVarCall = getObjectsCall(getObjectsObject, _callback); - return localVarCall; + return getObjectsCall(getObjectsObject, _callback); } /** @@ -4518,39 +3644,14 @@ private okhttp3.Call getObjectsValidateBeforeCall( */ public GetObjectsResponse getObjects(GetObjectsObject getObjectsObject) throws ApiException { - ApiResponse localVarResp = getObjectsWithHttpInfo( - getObjectsObject - ); - return localVarResp.getData(); - } - - /** - * Retrieve one or more objects. Retrieve one or more objects, potentially from different indices, - * in a single API call. - * - * @param getObjectsObject (required) - * @return ApiResponse<GetObjectsResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getObjectsWithHttpInfo( - GetObjectsObject getObjectsObject - ) throws ApiException { okhttp3.Call localVarCall = getObjectsValidateBeforeCall( getObjectsObject, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -4623,8 +3724,6 @@ public okhttp3.Call getRuleCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -4638,7 +3737,6 @@ public okhttp3.Call getRuleCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -4646,9 +3744,6 @@ public okhttp3.Call getRuleCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -4673,8 +3768,7 @@ private okhttp3.Call getRuleValidateBeforeCall( ); } - okhttp3.Call localVarCall = getRuleCall(indexName, objectID, _callback); - return localVarCall; + return getRuleCall(indexName, objectID, _callback); } /** @@ -4696,39 +3790,14 @@ private okhttp3.Call getRuleValidateBeforeCall( * */ public Rule getRule(String indexName, String objectID) throws ApiException { - ApiResponse localVarResp = getRuleWithHttpInfo(indexName, objectID); - return localVarResp.getData(); - } - - /** - * Get a rule. Retrieve the Rule with the specified objectID. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @return ApiResponse<Rule> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getRuleWithHttpInfo( - String indexName, - String objectID - ) throws ApiException { okhttp3.Call localVarCall = getRuleValidateBeforeCall( indexName, objectID, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -4797,8 +3866,6 @@ public okhttp3.Call getSettingsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -4812,7 +3879,6 @@ public okhttp3.Call getSettingsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -4820,9 +3886,6 @@ public okhttp3.Call getSettingsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -4839,8 +3902,7 @@ private okhttp3.Call getSettingsValidateBeforeCall( ); } - okhttp3.Call localVarCall = getSettingsCall(indexName, _callback); - return localVarCall; + return getSettingsCall(indexName, _callback); } /** @@ -4861,34 +3923,11 @@ private okhttp3.Call getSettingsValidateBeforeCall( * */ public IndexSettings getSettings(String indexName) throws ApiException { - ApiResponse localVarResp = getSettingsWithHttpInfo( - indexName - ); - return localVarResp.getData(); - } - - /** - * Retrieve settings of a given indexName. - * - * @param indexName The index in which to perform the request. (required) - * @return ApiResponse<IndexSettings> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getSettingsWithHttpInfo(String indexName) - throws ApiException { okhttp3.Call localVarCall = getSettingsValidateBeforeCall(indexName, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -4943,8 +3982,6 @@ public okhttp3.Call getSourcesCall(final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -4958,7 +3995,6 @@ public okhttp3.Call getSourcesCall(final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -4966,9 +4002,6 @@ public okhttp3.Call getSourcesCall(final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -4977,8 +4010,7 @@ public okhttp3.Call getSourcesCall(final ApiCallback _callback) private okhttp3.Call getSourcesValidateBeforeCall( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getSourcesCall(_callback); - return localVarCall; + return getSourcesCall(_callback); } /** @@ -4994,27 +4026,11 @@ private okhttp3.Call getSourcesValidateBeforeCall( * */ public List getSources() throws ApiException { - ApiResponse> localVarResp = getSourcesWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List all allowed sources. - * - * @return ApiResponse<List<Source>> - * @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> getSourcesWithHttpInfo() - throws ApiException { okhttp3.Call localVarCall = getSourcesValidateBeforeCall(null); Type localVarReturnType = new TypeToken>() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse> res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -5077,8 +4093,6 @@ public okhttp3.Call getSynonymCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -5092,7 +4106,6 @@ public okhttp3.Call getSynonymCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -5100,9 +4113,6 @@ public okhttp3.Call getSynonymCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -5127,8 +4137,7 @@ private okhttp3.Call getSynonymValidateBeforeCall( ); } - okhttp3.Call localVarCall = getSynonymCall(indexName, objectID, _callback); - return localVarCall; + return getSynonymCall(indexName, objectID, _callback); } /** @@ -5151,42 +4160,15 @@ private okhttp3.Call getSynonymValidateBeforeCall( */ public SynonymHit getSynonym(String indexName, String objectID) throws ApiException { - ApiResponse localVarResp = getSynonymWithHttpInfo( - indexName, - objectID - ); - return localVarResp.getData(); - } - - /** - * Get synonym. Fetch a synonym object identified by its objectID. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @return ApiResponse<SynonymHit> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getSynonymWithHttpInfo( - String indexName, - String objectID - ) throws ApiException { okhttp3.Call localVarCall = getSynonymValidateBeforeCall( indexName, objectID, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -5261,8 +4243,6 @@ public okhttp3.Call getTaskCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -5276,7 +4256,6 @@ public okhttp3.Call getTaskCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -5284,9 +4263,6 @@ public okhttp3.Call getTaskCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -5311,8 +4287,7 @@ private okhttp3.Call getTaskValidateBeforeCall( ); } - okhttp3.Call localVarCall = getTaskCall(indexName, taskID, _callback); - return localVarCall; + return getTaskCall(indexName, taskID, _callback); } /** @@ -5335,42 +4310,15 @@ private okhttp3.Call getTaskValidateBeforeCall( */ public GetTaskResponse getTask(String indexName, Integer taskID) throws ApiException { - ApiResponse localVarResp = getTaskWithHttpInfo( - indexName, - taskID - ); - return localVarResp.getData(); - } - - /** - * Check the current status of a given task. - * - * @param indexName The index in which to perform the request. (required) - * @param taskID Unique identifier of an task. Numeric value (up to 64bits) (required) - * @return ApiResponse<GetTaskResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getTaskWithHttpInfo( - String indexName, - Integer taskID - ) throws ApiException { okhttp3.Call localVarCall = getTaskValidateBeforeCall( indexName, taskID, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -5432,8 +4380,6 @@ public okhttp3.Call getTopUserIdsCall(final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -5447,7 +4393,6 @@ public okhttp3.Call getTopUserIdsCall(final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -5455,9 +4400,6 @@ public okhttp3.Call getTopUserIdsCall(final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -5466,8 +4408,7 @@ public okhttp3.Call getTopUserIdsCall(final ApiCallback _callback) private okhttp3.Call getTopUserIdsValidateBeforeCall( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getTopUserIdsCall(_callback); - return localVarCall; + return getTopUserIdsCall(_callback); } /** @@ -5490,35 +4431,12 @@ private okhttp3.Call getTopUserIdsValidateBeforeCall( * */ public GetTopUserIdsResponse getTopUserIds() throws ApiException { - ApiResponse localVarResp = getTopUserIdsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get top userID Get the top 10 userIDs with the highest number of records per cluster. The data - * returned will usually be a few seconds behind real time, because userID usage may take up to a - * few seconds to propagate to the different clusters. Upon success, the response is 200 OK and - * contains the following array of userIDs and clusters. - * - * @return ApiResponse<GetTopUserIdsResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getTopUserIdsWithHttpInfo() - throws ApiException { okhttp3.Call localVarCall = getTopUserIdsValidateBeforeCall(null); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -5581,8 +4499,6 @@ public okhttp3.Call getUserIdCall(Object userID, final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -5596,7 +4512,6 @@ public okhttp3.Call getUserIdCall(Object userID, final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -5604,9 +4519,6 @@ public okhttp3.Call getUserIdCall(Object userID, final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -5623,8 +4535,7 @@ private okhttp3.Call getUserIdValidateBeforeCall( ); } - okhttp3.Call localVarCall = getUserIdCall(userID, _callback); - return localVarCall; + return getUserIdCall(userID, _callback); } /** @@ -5648,35 +4559,10 @@ private okhttp3.Call getUserIdValidateBeforeCall( * */ public UserId getUserId(Object userID) throws ApiException { - ApiResponse localVarResp = getUserIdWithHttpInfo(userID); - return localVarResp.getData(); - } - - /** - * Get userID Returns the userID data stored in the mapping. The data returned will usually be a - * few seconds behind real time, because userID usage may take up to a few seconds to propagate to - * the different clusters. Upon success, the response is 200 OK and contains the following userID - * data. - * - * @param userID userID to assign. (required) - * @return ApiResponse<UserId> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse getUserIdWithHttpInfo(Object userID) - throws ApiException { okhttp3.Call localVarCall = getUserIdValidateBeforeCall(userID, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -5738,8 +4624,6 @@ public okhttp3.Call hasPendingMappingsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (getClusters != null) { localVarQueryParams.addAll( @@ -5759,7 +4643,6 @@ public okhttp3.Call hasPendingMappingsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -5767,9 +4650,6 @@ public okhttp3.Call hasPendingMappingsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -5779,8 +4659,7 @@ private okhttp3.Call hasPendingMappingsValidateBeforeCall( Boolean getClusters, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = hasPendingMappingsCall(getClusters, _callback); - return localVarCall; + return hasPendingMappingsCall(getClusters, _callback); } /** @@ -5806,42 +4685,14 @@ private okhttp3.Call hasPendingMappingsValidateBeforeCall( */ public CreatedAtResponse hasPendingMappings(Boolean getClusters) throws ApiException { - ApiResponse localVarResp = hasPendingMappingsWithHttpInfo( - getClusters - ); - return localVarResp.getData(); - } - - /** - * Has pending mappings Get the status of your clusters' migrations or user creations. Creating a - * large batch of users or migrating your multi-cluster may take quite some time. This method lets - * you retrieve the status of the migration, so you can know when it's done. Upon success, the - * response is 200 OK. A successful response indicates that the operation has been taken into - * account, and the userIDs are directly usable. - * - * @param getClusters (optional) - * @return ApiResponse<CreatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse hasPendingMappingsWithHttpInfo( - Boolean getClusters - ) throws ApiException { okhttp3.Call localVarCall = hasPendingMappingsValidateBeforeCall( getClusters, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -5904,8 +4755,6 @@ public okhttp3.Call listApiKeysCall(final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -5919,7 +4768,6 @@ public okhttp3.Call listApiKeysCall(final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -5927,9 +4775,6 @@ public okhttp3.Call listApiKeysCall(final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -5938,8 +4783,7 @@ public okhttp3.Call listApiKeysCall(final ApiCallback _callback) private okhttp3.Call listApiKeysValidateBeforeCall( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listApiKeysCall(_callback); - return localVarCall; + return listApiKeysCall(_callback); } /** @@ -5959,31 +4803,11 @@ private okhttp3.Call listApiKeysValidateBeforeCall( * */ public ListApiKeysResponse listApiKeys() throws ApiException { - ApiResponse localVarResp = listApiKeysWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get the full list of API Keys. List API keys, along with their associated rights. - * - * @return ApiResponse<ListApiKeysResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse listApiKeysWithHttpInfo() - throws ApiException { okhttp3.Call localVarCall = listApiKeysValidateBeforeCall(null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -6038,8 +4862,6 @@ public okhttp3.Call listClustersCall(final ApiCallback _callback) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -6053,7 +4875,6 @@ public okhttp3.Call listClustersCall(final ApiCallback _callback) this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -6061,9 +4882,6 @@ public okhttp3.Call listClustersCall(final ApiCallback _callback) localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -6072,8 +4890,7 @@ public okhttp3.Call listClustersCall(final ApiCallback _callback) private okhttp3.Call listClustersValidateBeforeCall( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listClustersCall(_callback); - return localVarCall; + return listClustersCall(_callback); } /** @@ -6094,33 +4911,12 @@ private okhttp3.Call listClustersValidateBeforeCall( * */ public ListClustersResponse listClusters() throws ApiException { - ApiResponse localVarResp = listClustersWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List clusters List the clusters available in a multi-clusters setup for a single appID. Upon - * success, the response is 200 OK and contains the following clusters. - * - * @return ApiResponse<ListClustersResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse listClustersWithHttpInfo() - throws ApiException { okhttp3.Call localVarCall = listClustersValidateBeforeCall(null); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -6181,8 +4977,6 @@ public okhttp3.Call listIndicesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (page != null) { localVarQueryParams.addAll(this.parameterToPair("Page", page)); @@ -6200,7 +4994,6 @@ public okhttp3.Call listIndicesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -6208,9 +5001,6 @@ public okhttp3.Call listIndicesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -6220,8 +5010,7 @@ private okhttp3.Call listIndicesValidateBeforeCall( Integer page, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listIndicesCall(page, _callback); - return localVarCall; + return listIndicesCall(page, _callback); } /** @@ -6244,36 +5033,11 @@ private okhttp3.Call listIndicesValidateBeforeCall( * */ public ListIndicesResponse listIndices(Integer page) throws ApiException { - ApiResponse localVarResp = listIndicesWithHttpInfo( - page - ); - return localVarResp.getData(); - } - - /** - * List existing indexes. List existing indexes from an application. - * - * @param page Requested page (zero-based). When specified, will retrieve a specific page; the - * page size is implicitly set to 100. When null, will retrieve all indices (no pagination). - * (optional) - * @return ApiResponse<ListIndicesResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse listIndicesWithHttpInfo(Integer page) - throws ApiException { okhttp3.Call localVarCall = listIndicesValidateBeforeCall(page, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -6338,8 +5102,6 @@ public okhttp3.Call listUserIdsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (page != null) { localVarQueryParams.addAll(this.parameterToPair("Page", page)); @@ -6363,7 +5125,6 @@ public okhttp3.Call listUserIdsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "GET", @@ -6371,9 +5132,6 @@ public okhttp3.Call listUserIdsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -6384,8 +5142,7 @@ private okhttp3.Call listUserIdsValidateBeforeCall( Integer hitsPerPage, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listUserIdsCall(page, hitsPerPage, _callback); - return localVarCall; + return listUserIdsCall(page, hitsPerPage, _callback); } /** @@ -6413,47 +5170,15 @@ private okhttp3.Call listUserIdsValidateBeforeCall( */ public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage) throws ApiException { - ApiResponse localVarResp = listUserIdsWithHttpInfo( - page, - hitsPerPage - ); - return localVarResp.getData(); - } - - /** - * List userIDs List the userIDs assigned to a multi-clusters appID. The data returned will - * usually be a few seconds behind real time, because userID usage may take up to a few seconds to - * propagate to the different clusters. Upon success, the response is 200 OK and contains the - * following userIDs data. - * - * @param page Requested page (zero-based). When specified, will retrieve a specific page; the - * page size is implicitly set to 100. When null, will retrieve all indices (no pagination). - * (optional) - * @param hitsPerPage Maximum number of objects to retrieve. (optional, default to 100) - * @return ApiResponse<ListUserIdsResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse listUserIdsWithHttpInfo( - Integer page, - Integer hitsPerPage - ) throws ApiException { okhttp3.Call localVarCall = listUserIdsValidateBeforeCall( page, hitsPerPage, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -6523,8 +5248,6 @@ public okhttp3.Call multipleBatchCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -6537,7 +5260,6 @@ public okhttp3.Call multipleBatchCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -6545,9 +5267,6 @@ public okhttp3.Call multipleBatchCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -6564,8 +5283,7 @@ private okhttp3.Call multipleBatchValidateBeforeCall( ); } - okhttp3.Call localVarCall = multipleBatchCall(batchObject, _callback); - return localVarCall; + return multipleBatchCall(batchObject, _callback); } /** @@ -6588,40 +5306,15 @@ private okhttp3.Call multipleBatchValidateBeforeCall( */ public MultipleBatchResponse multipleBatch(BatchObject batchObject) throws ApiException { - ApiResponse localVarResp = multipleBatchWithHttpInfo( - batchObject - ); - return localVarResp.getData(); - } - - /** - * Perform multiple write operations, potentially targeting multiple indices, in a single API - * call. - * - * @param batchObject (required) - * @return ApiResponse<MultipleBatchResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse multipleBatchWithHttpInfo( - BatchObject batchObject - ) throws ApiException { okhttp3.Call localVarCall = multipleBatchValidateBeforeCall( batchObject, null ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -6685,8 +5378,6 @@ public okhttp3.Call multipleQueriesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -6699,7 +5390,6 @@ public okhttp3.Call multipleQueriesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -6707,9 +5397,6 @@ public okhttp3.Call multipleQueriesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -6726,45 +5413,15 @@ private okhttp3.Call multipleQueriesValidateBeforeCall( " multipleQueries(Async)" ); } - - okhttp3.Call localVarCall = multipleQueriesCall( - multipleQueriesObject, - _callback - ); - return localVarCall; - } - - /** - * Get search results for the given requests. - * - * @param multipleQueriesObject (required) - * @return MultipleQueriesResponse - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public MultipleQueriesResponse multipleQueries( - MultipleQueriesObject multipleQueriesObject - ) throws ApiException { - ApiResponse localVarResp = multipleQueriesWithHttpInfo( - multipleQueriesObject - ); - return localVarResp.getData(); + + return multipleQueriesCall(multipleQueriesObject, _callback); } /** * Get search results for the given requests. * * @param multipleQueriesObject (required) - * @return ApiResponse<MultipleQueriesResponse> + * @return MultipleQueriesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details @@ -6777,7 +5434,7 @@ public MultipleQueriesResponse multipleQueries( * 404 Index not found. - * */ - public ApiResponse multipleQueriesWithHttpInfo( + public MultipleQueriesResponse multipleQueries( MultipleQueriesObject multipleQueriesObject ) throws ApiException { okhttp3.Call localVarCall = multipleQueriesValidateBeforeCall( @@ -6786,7 +5443,9 @@ public ApiResponse multipleQueriesWithHttpInfo( ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -6855,8 +5514,6 @@ public okhttp3.Call operationIndexCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -6869,7 +5526,6 @@ public okhttp3.Call operationIndexCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -6877,9 +5533,6 @@ public okhttp3.Call operationIndexCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -6905,12 +5558,7 @@ private okhttp3.Call operationIndexValidateBeforeCall( ); } - okhttp3.Call localVarCall = operationIndexCall( - indexName, - operationIndexObject, - _callback - ); - return localVarCall; + return operationIndexCall(indexName, operationIndexObject, _callback); } /** @@ -6934,35 +5582,6 @@ private okhttp3.Call operationIndexValidateBeforeCall( public UpdatedAtResponse operationIndex( String indexName, OperationIndexObject operationIndexObject - ) throws ApiException { - ApiResponse localVarResp = operationIndexWithHttpInfo( - indexName, - operationIndexObject - ); - return localVarResp.getData(); - } - - /** - * Copy/move index. Peforms a copy or a move operation on a index. - * - * @param indexName The index in which to perform the request. (required) - * @param operationIndexObject (required) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse operationIndexWithHttpInfo( - String indexName, - OperationIndexObject operationIndexObject ) throws ApiException { okhttp3.Call localVarCall = operationIndexValidateBeforeCall( indexName, @@ -6970,7 +5589,9 @@ public ApiResponse operationIndexWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -7050,8 +5671,6 @@ public okhttp3.Call partialUpdateObjectCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (createIfNotExists != null) { localVarQueryParams.addAll( @@ -7070,7 +5689,6 @@ public okhttp3.Call partialUpdateObjectCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -7078,9 +5696,6 @@ public okhttp3.Call partialUpdateObjectCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -7115,14 +5730,13 @@ private okhttp3.Call partialUpdateObjectValidateBeforeCall( ); } - okhttp3.Call localVarCall = partialUpdateObjectCall( + return partialUpdateObjectCall( indexName, objectID, buildInOperation, createIfNotExists, _callback ); - return localVarCall; } /** @@ -7154,45 +5768,6 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( String objectID, List> buildInOperation, Boolean createIfNotExists - ) throws ApiException { - ApiResponse localVarResp = partialUpdateObjectWithHttpInfo( - indexName, - objectID, - buildInOperation, - createIfNotExists - ); - return localVarResp.getData(); - } - - /** - * Partially update an object. Update one or more attributes of an existing object. This method - * lets you update only a part of an existing object, either by adding new attributes or updating - * existing ones. You can partially update several objects in a single method call. If the index - * targeted by this operation doesn't exist yet, it's automatically created. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param buildInOperation The Algolia object. (required) - * @param createIfNotExists Creates the record if it does not exist yet. (optional, default to - * true) - * @return ApiResponse<UpdatedAtWithObjectIdResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse partialUpdateObjectWithHttpInfo( - String indexName, - String objectID, - List> buildInOperation, - Boolean createIfNotExists ) throws ApiException { okhttp3.Call localVarCall = partialUpdateObjectValidateBeforeCall( indexName, @@ -7203,7 +5778,9 @@ public ApiResponse partialUpdateObjectWithHttpInf ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -7284,8 +5861,6 @@ public okhttp3.Call removeUserIdCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -7299,7 +5874,6 @@ public okhttp3.Call removeUserIdCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "DELETE", @@ -7307,9 +5881,6 @@ public okhttp3.Call removeUserIdCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -7326,8 +5897,7 @@ private okhttp3.Call removeUserIdValidateBeforeCall( ); } - okhttp3.Call localVarCall = removeUserIdCall(userID, _callback); - return localVarCall; + return removeUserIdCall(userID, _callback); } /** @@ -7349,37 +5919,12 @@ private okhttp3.Call removeUserIdValidateBeforeCall( * */ public RemoveUserIdResponse removeUserId(Object userID) throws ApiException { - ApiResponse localVarResp = removeUserIdWithHttpInfo( - userID - ); - return localVarResp.getData(); - } - - /** - * Remove userID Remove a userID and its associated data from the multi-clusters. Upon success, - * the response is 200 OK and a task is created to remove the userID data and mapping. - * - * @param userID userID to assign. (required) - * @return ApiResponse<RemoveUserIdResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse removeUserIdWithHttpInfo( - Object userID - ) throws ApiException { okhttp3.Call localVarCall = removeUserIdValidateBeforeCall(userID, null); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -7440,8 +5985,6 @@ public okhttp3.Call replaceSourcesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -7454,7 +5997,6 @@ public okhttp3.Call replaceSourcesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "PUT", @@ -7462,9 +6004,6 @@ public okhttp3.Call replaceSourcesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -7481,8 +6020,7 @@ private okhttp3.Call replaceSourcesValidateBeforeCall( ); } - okhttp3.Call localVarCall = replaceSourcesCall(source, _callback); - return localVarCall; + return replaceSourcesCall(source, _callback); } /** @@ -7500,32 +6038,12 @@ private okhttp3.Call replaceSourcesValidateBeforeCall( */ public ReplaceSourceResponse replaceSources(List source) throws ApiException { - ApiResponse localVarResp = replaceSourcesWithHttpInfo( - source - ); - return localVarResp.getData(); - } - - /** - * Replace all allowed sources. - * - * @param source The sources to allow. (required) - * @return ApiResponse<ReplaceSourceResponse> - * @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 replaceSourcesWithHttpInfo( - List source - ) throws ApiException { okhttp3.Call localVarCall = replaceSourcesValidateBeforeCall(source, null); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -7588,8 +6106,6 @@ public okhttp3.Call restoreApiKeyCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -7603,7 +6119,6 @@ public okhttp3.Call restoreApiKeyCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -7611,9 +6126,6 @@ public okhttp3.Call restoreApiKeyCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -7630,8 +6142,7 @@ private okhttp3.Call restoreApiKeyValidateBeforeCall( ); } - okhttp3.Call localVarCall = restoreApiKeyCall(key, _callback); - return localVarCall; + return restoreApiKeyCall(key, _callback); } /** @@ -7652,34 +6163,11 @@ private okhttp3.Call restoreApiKeyValidateBeforeCall( * */ public AddApiKeyResponse restoreApiKey(String key) throws ApiException { - ApiResponse localVarResp = restoreApiKeyWithHttpInfo( - key - ); - return localVarResp.getData(); - } - - /** - * Restore an API key. Restore a deleted API key, along with its associated rights. - * - * @param key API Key string. (required) - * @return ApiResponse<AddApiKeyResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse restoreApiKeyWithHttpInfo(String key) - throws ApiException { okhttp3.Call localVarCall = restoreApiKeyValidateBeforeCall(key, null); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -7745,8 +6233,6 @@ public okhttp3.Call saveObjectCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -7759,7 +6245,6 @@ public okhttp3.Call saveObjectCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -7767,9 +6252,6 @@ public okhttp3.Call saveObjectCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -7794,12 +6276,7 @@ private okhttp3.Call saveObjectValidateBeforeCall( ); } - okhttp3.Call localVarCall = saveObjectCall( - indexName, - requestBody, - _callback - ); - return localVarCall; + return saveObjectCall(indexName, requestBody, _callback); } /** @@ -7823,35 +6300,6 @@ private okhttp3.Call saveObjectValidateBeforeCall( public SaveObjectResponse saveObject( String indexName, Map requestBody - ) throws ApiException { - ApiResponse localVarResp = saveObjectWithHttpInfo( - indexName, - requestBody - ); - return localVarResp.getData(); - } - - /** - * Add an object to the index, automatically assigning it an object ID. - * - * @param indexName The index in which to perform the request. (required) - * @param requestBody The Algolia object. (required) - * @return ApiResponse<SaveObjectResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse saveObjectWithHttpInfo( - String indexName, - Map requestBody ) throws ApiException { okhttp3.Call localVarCall = saveObjectValidateBeforeCall( indexName, @@ -7859,7 +6307,9 @@ public ApiResponse saveObjectWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -7939,8 +6389,6 @@ public okhttp3.Call saveRuleCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -7959,7 +6407,6 @@ public okhttp3.Call saveRuleCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "PUT", @@ -7967,9 +6414,6 @@ public okhttp3.Call saveRuleCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -8003,14 +6447,13 @@ private okhttp3.Call saveRuleValidateBeforeCall( ); } - okhttp3.Call localVarCall = saveRuleCall( + return saveRuleCall( indexName, objectID, rule, forwardToReplicas, _callback ); - return localVarCall; } /** @@ -8039,42 +6482,6 @@ public UpdatedRuleResponse saveRule( String objectID, Rule rule, Boolean forwardToReplicas - ) throws ApiException { - ApiResponse localVarResp = saveRuleWithHttpInfo( - indexName, - objectID, - rule, - forwardToReplicas - ); - return localVarResp.getData(); - } - - /** - * Save/Update a rule. Create or update the Rule with the specified objectID. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param rule (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @return ApiResponse<UpdatedRuleResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse saveRuleWithHttpInfo( - String indexName, - String objectID, - Rule rule, - Boolean forwardToReplicas ) throws ApiException { okhttp3.Call localVarCall = saveRuleValidateBeforeCall( indexName, @@ -8084,7 +6491,9 @@ public ApiResponse saveRuleWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -8171,8 +6580,6 @@ public okhttp3.Call saveSynonymCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -8191,7 +6598,6 @@ public okhttp3.Call saveSynonymCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "PUT", @@ -8199,9 +6605,6 @@ public okhttp3.Call saveSynonymCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -8235,14 +6638,13 @@ private okhttp3.Call saveSynonymValidateBeforeCall( ); } - okhttp3.Call localVarCall = saveSynonymCall( + return saveSynonymCall( indexName, objectID, synonymHit, forwardToReplicas, _callback ); - return localVarCall; } /** @@ -8272,43 +6674,6 @@ public SaveSynonymResponse saveSynonym( String objectID, SynonymHit synonymHit, Boolean forwardToReplicas - ) throws ApiException { - ApiResponse localVarResp = saveSynonymWithHttpInfo( - indexName, - objectID, - synonymHit, - forwardToReplicas - ); - return localVarResp.getData(); - } - - /** - * Save synonym. Create a new synonym object or update the existing synonym object with the given - * object ID. - * - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param synonymHit (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @return ApiResponse<SaveSynonymResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse saveSynonymWithHttpInfo( - String indexName, - String objectID, - SynonymHit synonymHit, - Boolean forwardToReplicas ) throws ApiException { okhttp3.Call localVarCall = saveSynonymValidateBeforeCall( indexName, @@ -8318,7 +6683,9 @@ public ApiResponse saveSynonymWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -8403,8 +6770,6 @@ public okhttp3.Call saveSynonymsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -8429,7 +6794,6 @@ public okhttp3.Call saveSynonymsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -8437,9 +6801,6 @@ public okhttp3.Call saveSynonymsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -8466,14 +6827,13 @@ private okhttp3.Call saveSynonymsValidateBeforeCall( ); } - okhttp3.Call localVarCall = saveSynonymsCall( + return saveSynonymsCall( indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, _callback ); - return localVarCall; } /** @@ -8499,45 +6859,7 @@ private okhttp3.Call saveSynonymsValidateBeforeCall( * 404 Index not found. - * */ - public UpdatedAtResponse saveSynonyms( - String indexName, - List synonymHit, - Boolean forwardToReplicas, - Boolean replaceExistingSynonyms - ) throws ApiException { - ApiResponse localVarResp = saveSynonymsWithHttpInfo( - indexName, - synonymHit, - forwardToReplicas, - replaceExistingSynonyms - ); - return localVarResp.getData(); - } - - /** - * Save a batch of synonyms. Create/update multiple synonym objects at once, potentially replacing - * the entire list of synonyms if replaceExistingSynonyms is true. - * - * @param indexName The index in which to perform the request. (required) - * @param synonymHit (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @param replaceExistingSynonyms Replace all synonyms of the index with the ones sent with this - * request. (optional) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse saveSynonymsWithHttpInfo( + public UpdatedAtResponse saveSynonyms( String indexName, List synonymHit, Boolean forwardToReplicas, @@ -8551,7 +6873,9 @@ public ApiResponse saveSynonymsWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -8631,8 +6955,6 @@ public okhttp3.Call searchCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -8645,7 +6967,6 @@ public okhttp3.Call searchCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -8653,9 +6974,6 @@ public okhttp3.Call searchCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -8680,8 +6998,7 @@ private okhttp3.Call searchValidateBeforeCall( ); } - okhttp3.Call localVarCall = searchCall(indexName, searchParams, _callback); - return localVarCall; + return searchCall(indexName, searchParams, _callback); } /** @@ -8704,42 +7021,15 @@ private okhttp3.Call searchValidateBeforeCall( */ public SearchResponse search(String indexName, SearchParams searchParams) throws ApiException { - ApiResponse localVarResp = searchWithHttpInfo( - indexName, - searchParams - ); - return localVarResp.getData(); - } - - /** - * Get search results. - * - * @param indexName The index in which to perform the request. (required) - * @param searchParams (required) - * @return ApiResponse<SearchResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse searchWithHttpInfo( - String indexName, - SearchParams searchParams - ) throws ApiException { okhttp3.Call localVarCall = searchValidateBeforeCall( indexName, searchParams, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -8810,8 +7100,6 @@ public okhttp3.Call searchDictionaryEntriesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -8824,7 +7112,6 @@ public okhttp3.Call searchDictionaryEntriesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -8832,9 +7119,6 @@ public okhttp3.Call searchDictionaryEntriesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -8861,12 +7145,11 @@ private okhttp3.Call searchDictionaryEntriesValidateBeforeCall( ); } - okhttp3.Call localVarCall = searchDictionaryEntriesCall( + return searchDictionaryEntriesCall( dictionaryName, searchDictionaryEntries, _callback ); - return localVarCall; } /** @@ -8890,35 +7173,6 @@ private okhttp3.Call searchDictionaryEntriesValidateBeforeCall( public UpdatedAtResponse searchDictionaryEntries( String dictionaryName, SearchDictionaryEntries searchDictionaryEntries - ) throws ApiException { - ApiResponse localVarResp = searchDictionaryEntriesWithHttpInfo( - dictionaryName, - searchDictionaryEntries - ); - return localVarResp.getData(); - } - - /** - * Search the dictionary entries. Search the dictionary entries. - * - * @param dictionaryName The dictionary to search in. (required) - * @param searchDictionaryEntries (required) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse searchDictionaryEntriesWithHttpInfo( - String dictionaryName, - SearchDictionaryEntries searchDictionaryEntries ) throws ApiException { okhttp3.Call localVarCall = searchDictionaryEntriesValidateBeforeCall( dictionaryName, @@ -8926,7 +7180,9 @@ public ApiResponse searchDictionaryEntriesWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -9003,8 +7259,6 @@ public okhttp3.Call searchForFacetValuesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -9017,7 +7271,6 @@ public okhttp3.Call searchForFacetValuesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -9025,9 +7278,6 @@ public okhttp3.Call searchForFacetValuesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -9053,13 +7303,12 @@ private okhttp3.Call searchForFacetValuesValidateBeforeCall( ); } - okhttp3.Call localVarCall = searchForFacetValuesCall( + return searchForFacetValuesCall( indexName, facetName, searchForFacetValuesRequest, _callback ); - return localVarCall; } /** @@ -9086,39 +7335,6 @@ public SearchForFacetValuesResponse searchForFacetValues( String indexName, String facetName, SearchForFacetValuesRequest searchForFacetValuesRequest - ) throws ApiException { - ApiResponse localVarResp = searchForFacetValuesWithHttpInfo( - indexName, - facetName, - searchForFacetValuesRequest - ); - return localVarResp.getData(); - } - - /** - * Search for values of a given facet Search for values of a given facet, optionally restricting - * the returned values to those contained in objects matching other search criteria. - * - * @param indexName The index in which to perform the request. (required) - * @param facetName The facet name. (required) - * @param searchForFacetValuesRequest (optional) - * @return ApiResponse<SearchForFacetValuesResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse searchForFacetValuesWithHttpInfo( - String indexName, - String facetName, - SearchForFacetValuesRequest searchForFacetValuesRequest ) throws ApiException { okhttp3.Call localVarCall = searchForFacetValuesValidateBeforeCall( indexName, @@ -9128,7 +7344,9 @@ public ApiResponse searchForFacetValuesWithHttpInf ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -9205,8 +7423,6 @@ public okhttp3.Call searchRulesCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -9219,7 +7435,6 @@ public okhttp3.Call searchRulesCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -9227,9 +7442,6 @@ public okhttp3.Call searchRulesCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -9254,12 +7466,7 @@ private okhttp3.Call searchRulesValidateBeforeCall( ); } - okhttp3.Call localVarCall = searchRulesCall( - indexName, - searchRulesParams, - _callback - ); - return localVarCall; + return searchRulesCall(indexName, searchRulesParams, _callback); } /** @@ -9283,35 +7490,6 @@ private okhttp3.Call searchRulesValidateBeforeCall( public SearchRulesResponse searchRules( String indexName, SearchRulesParams searchRulesParams - ) throws ApiException { - ApiResponse localVarResp = searchRulesWithHttpInfo( - indexName, - searchRulesParams - ); - return localVarResp.getData(); - } - - /** - * Search for rules. Search for rules matching various criteria. - * - * @param indexName The index in which to perform the request. (required) - * @param searchRulesParams (required) - * @return ApiResponse<SearchRulesResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse searchRulesWithHttpInfo( - String indexName, - SearchRulesParams searchRulesParams ) throws ApiException { okhttp3.Call localVarCall = searchRulesValidateBeforeCall( indexName, @@ -9319,7 +7497,9 @@ public ApiResponse searchRulesWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -9398,8 +7578,6 @@ public okhttp3.Call searchSynonymsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (query != null) { localVarQueryParams.addAll(this.parameterToPair("query", query)); @@ -9431,7 +7609,6 @@ public okhttp3.Call searchSynonymsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -9439,9 +7616,6 @@ public okhttp3.Call searchSynonymsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -9462,7 +7636,7 @@ private okhttp3.Call searchSynonymsValidateBeforeCall( ); } - okhttp3.Call localVarCall = searchSynonymsCall( + return searchSynonymsCall( indexName, query, type, @@ -9470,7 +7644,6 @@ private okhttp3.Call searchSynonymsValidateBeforeCall( hitsPerPage, _callback ); - return localVarCall; } /** @@ -9503,47 +7676,6 @@ public SearchSynonymsResponse searchSynonyms( String type, Integer page, Integer hitsPerPage - ) throws ApiException { - ApiResponse localVarResp = searchSynonymsWithHttpInfo( - indexName, - query, - type, - page, - hitsPerPage - ); - return localVarResp.getData(); - } - - /** - * Get all synonyms that match a query. Search or browse all synonyms, optionally filtering them - * by type. - * - * @param indexName The index in which to perform the request. (required) - * @param query Search for specific synonyms matching this string. (optional, default to ) - * @param type Only search for specific types of synonyms. (optional) - * @param page Requested page (zero-based). When specified, will retrieve a specific page; the - * page size is implicitly set to 100. When null, will retrieve all indices (no pagination). - * (optional, default to 0) - * @param hitsPerPage Maximum number of objects to retrieve. (optional, default to 100) - * @return ApiResponse<SearchSynonymsResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse searchSynonymsWithHttpInfo( - String indexName, - String query, - String type, - Integer page, - Integer hitsPerPage ) throws ApiException { okhttp3.Call localVarCall = searchSynonymsValidateBeforeCall( indexName, @@ -9555,7 +7687,9 @@ public ApiResponse searchSynonymsWithHttpInfo( ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -9633,8 +7767,6 @@ public okhttp3.Call searchUserIdsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -9647,7 +7779,6 @@ public okhttp3.Call searchUserIdsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "POST", @@ -9655,9 +7786,6 @@ public okhttp3.Call searchUserIdsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -9674,11 +7802,7 @@ private okhttp3.Call searchUserIdsValidateBeforeCall( ); } - okhttp3.Call localVarCall = searchUserIdsCall( - searchUserIdsObject, - _callback - ); - return localVarCall; + return searchUserIdsCall(searchUserIdsObject, _callback); } /** @@ -9706,38 +7830,6 @@ private okhttp3.Call searchUserIdsValidateBeforeCall( */ public SearchUserIdsResponse searchUserIds( SearchUserIdsObject searchUserIdsObject - ) throws ApiException { - ApiResponse localVarResp = searchUserIdsWithHttpInfo( - searchUserIdsObject - ); - return localVarResp.getData(); - } - - /** - * Search userID Search for userIDs. The data returned will usually be a few seconds behind real - * time, because userID usage may take up to a few seconds propagate to the different clusters. To - * keep updates moving quickly, the index of userIDs isn't built synchronously with the mapping. - * Instead, the index is built once every 12h, at the same time as the update of userID usage. For - * example, when you perform a modification like adding or moving a userID, the search will report - * an outdated value until the next rebuild of the mapping, which takes place every 12h. Upon - * success, the response is 200 OK and contains the following userIDs data. - * - * @param searchUserIdsObject (required) - * @return ApiResponse<SearchUserIdsResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse searchUserIdsWithHttpInfo( - SearchUserIdsObject searchUserIdsObject ) throws ApiException { okhttp3.Call localVarCall = searchUserIdsValidateBeforeCall( searchUserIdsObject, @@ -9745,7 +7837,9 @@ public ApiResponse searchUserIdsWithHttpInfo( ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -9815,8 +7909,6 @@ public okhttp3.Call setDictionarySettingsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -9829,7 +7921,6 @@ public okhttp3.Call setDictionarySettingsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "PUT", @@ -9837,9 +7928,6 @@ public okhttp3.Call setDictionarySettingsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -9857,11 +7945,7 @@ private okhttp3.Call setDictionarySettingsValidateBeforeCall( ); } - okhttp3.Call localVarCall = setDictionarySettingsCall( - dictionarySettingsRequest, - _callback - ); - return localVarCall; + return setDictionarySettingsCall(dictionarySettingsRequest, _callback); } /** @@ -9883,39 +7967,15 @@ private okhttp3.Call setDictionarySettingsValidateBeforeCall( */ public UpdatedAtResponse setDictionarySettings( DictionarySettingsRequest dictionarySettingsRequest - ) throws ApiException { - ApiResponse localVarResp = setDictionarySettingsWithHttpInfo( - dictionarySettingsRequest - ); - return localVarResp.getData(); - } - - /** - * Set dictionary settings. Set dictionary settings. - * - * @param dictionarySettingsRequest (required) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse setDictionarySettingsWithHttpInfo( - DictionarySettingsRequest dictionarySettingsRequest ) throws ApiException { okhttp3.Call localVarCall = setDictionarySettingsValidateBeforeCall( dictionarySettingsRequest, null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -9986,8 +8046,6 @@ public okhttp3.Call setSettingsCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); if (forwardToReplicas != null) { localVarQueryParams.addAll( @@ -10006,7 +8064,6 @@ public okhttp3.Call setSettingsCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "PUT", @@ -10014,9 +8071,6 @@ public okhttp3.Call setSettingsCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -10042,13 +8096,12 @@ private okhttp3.Call setSettingsValidateBeforeCall( ); } - okhttp3.Call localVarCall = setSettingsCall( + return setSettingsCall( indexName, indexSettings, forwardToReplicas, _callback ); - return localVarCall; } /** @@ -10076,40 +8129,6 @@ public UpdatedAtResponse setSettings( String indexName, IndexSettings indexSettings, Boolean forwardToReplicas - ) throws ApiException { - ApiResponse localVarResp = setSettingsWithHttpInfo( - indexName, - indexSettings, - forwardToReplicas - ); - return localVarResp.getData(); - } - - /** - * Update settings of a given indexName. Only specified settings are overridden; unspecified - * settings are left unchanged. Specifying null for a setting resets it to its default value. - * - * @param indexName The index in which to perform the request. (required) - * @param indexSettings (required) - * @param forwardToReplicas When true, changes are also propagated to replicas of the given - * indexName. (optional) - * @return ApiResponse<UpdatedAtResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse setSettingsWithHttpInfo( - String indexName, - IndexSettings indexSettings, - Boolean forwardToReplicas ) throws ApiException { okhttp3.Call localVarCall = setSettingsValidateBeforeCall( indexName, @@ -10118,7 +8137,9 @@ public ApiResponse setSettingsWithHttpInfo( null ); Type localVarReturnType = new TypeToken() {}.getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** @@ -10195,8 +8216,6 @@ public okhttp3.Call updateApiKeyCall( List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = this.selectHeaderAccept(localVarAccepts); @@ -10209,7 +8228,6 @@ public okhttp3.Call updateApiKeyCall( this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "apiKey", "appId" }; return this.buildCall( localVarPath, "PUT", @@ -10217,9 +8235,6 @@ public okhttp3.Call updateApiKeyCall( localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, _callback ); } @@ -10244,8 +8259,7 @@ private okhttp3.Call updateApiKeyValidateBeforeCall( ); } - okhttp3.Call localVarCall = updateApiKeyCall(key, apiKey, _callback); - return localVarCall; + return updateApiKeyCall(key, apiKey, _callback); } /** @@ -10268,35 +8282,6 @@ private okhttp3.Call updateApiKeyValidateBeforeCall( */ public UpdateApiKeyResponse updateApiKey(String key, ApiKey apiKey) throws ApiException { - ApiResponse localVarResp = updateApiKeyWithHttpInfo( - key, - apiKey - ); - return localVarResp.getData(); - } - - /** - * Update an API key. Replace every permission of an existing API key. - * - * @param key API Key string. (required) - * @param apiKey (required) - * @return ApiResponse<UpdateApiKeyResponse> - * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public ApiResponse updateApiKeyWithHttpInfo( - String key, - ApiKey apiKey - ) throws ApiException { okhttp3.Call localVarCall = updateApiKeyValidateBeforeCall( key, apiKey, @@ -10304,7 +8289,9 @@ public ApiResponse updateApiKeyWithHttpInfo( ); Type localVarReturnType = new TypeToken() {} .getType(); - return this.execute(localVarCall, localVarReturnType); + ApiResponse res = + this.execute(localVarCall, localVarReturnType); + return res.getData(); } /** diff --git a/playground/java/pom.xml b/playground/java/pom.xml index 4e557f95f8f..ad39e67a400 100644 --- a/playground/java/pom.xml +++ b/playground/java/pom.xml @@ -26,7 +26,7 @@ io.github.cdimascio dotenv-java - 2.2.0 + 2.2.2 com.algolia diff --git a/playground/java/src/main/java/com/test/App.java b/playground/java/src/main/java/com/test/App.java index cf1845ffb4d..2f55a848cc8 100644 --- a/playground/java/src/main/java/com/test/App.java +++ b/playground/java/src/main/java/com/test/App.java @@ -8,12 +8,12 @@ public class App { public static void main(String[] args) { - Dotenv dotenv = Dotenv.configure().directory("../").load(); - System.out.println(dotenv.get("ALGOLIA_APPLICATION_ID")); + Dotenv dotenv = Dotenv.configure().directory("playground/").load(); SearchApi client = new SearchApi(dotenv.get("ALGOLIA_APPLICATION_ID"), dotenv.get("ALGOLIA_SEARCH_KEY")); - String indexName = "myIndexName"; // String | The index in which to perform the request. + String indexName = dotenv.get("SEARCH_INDEX"); SearchParams params = new SearchParams(); + params.setQuery(dotenv.get("SEARCH_QUERY")); try { SearchResponse result = client.search(indexName, params); System.out.println(result); diff --git a/templates/java/ServerConfiguration.mustache b/templates/java/ServerConfiguration.mustache deleted file mode 100644 index e21b63391e2..00000000000 --- a/templates/java/ServerConfiguration.mustache +++ /dev/null @@ -1,58 +0,0 @@ -package {{invokerPackage}}; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replaceAll("\\{" + name + "\\}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/templates/java/ServerVariable.mustache b/templates/java/ServerVariable.mustache deleted file mode 100644 index 1978b1eb95e..00000000000 --- a/templates/java/ServerVariable.mustache +++ /dev/null @@ -1,23 +0,0 @@ -package {{invokerPackage}}; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/templates/java/libraries/okhttp-gson/ApiCallback.mustache b/templates/java/libraries/okhttp-gson/ApiCallback.mustache index a86035f690a..b4889a0319e 100644 --- a/templates/java/libraries/okhttp-gson/ApiCallback.mustache +++ b/templates/java/libraries/okhttp-gson/ApiCallback.mustache @@ -1,7 +1,5 @@ package {{invokerPackage}}; -import java.io.IOException; - import java.util.Map; import java.util.List; diff --git a/templates/java/libraries/okhttp-gson/ApiClient.mustache b/templates/java/libraries/okhttp-gson/ApiClient.mustache index a06cbb1d706..d2f144bee02 100644 --- a/templates/java/libraries/okhttp-gson/ApiClient.mustache +++ b/templates/java/libraries/okhttp-gson/ApiClient.mustache @@ -7,20 +7,6 @@ import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; import okio.BufferedSink; import okio.Okio; -{{#joda}} -import org.joda.time.DateTime; -import org.joda.time.LocalDate; -import org.joda.time.format.DateTimeFormatter; -{{/joda}} -{{#threetenbp}} -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; -{{/threetenbp}} -{{#hasOAuthMethods}} -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; -import org.apache.oltu.oauth2.common.message.types.GrantType; -{{/hasOAuthMethods}} import javax.net.ssl.*; import java.io.File; @@ -56,15 +42,12 @@ public class ApiClient { private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); + private String basePath; private String appId, apiKey; private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; private InputStream sslCaCert; private boolean verifyingSsl; @@ -97,10 +80,6 @@ public class ApiClient { for (Interceptor interceptor: interceptors) { builder.addInterceptor(interceptor); } - {{#useGzipFeature}} - // Enable gzip request compression - builder.addInterceptor(new GzipRequestInterceptor()); - {{/useGzipFeature}} httpClient = builder.build(); } @@ -238,18 +217,6 @@ public class ApiClient { return this; } - /** - * Add a default cookie. - * - * @param key The cookie's key - * @param value The cookie's value - * @return ApiClient - */ - public ApiClient addDefaultCookie(String key, String value) { - defaultCookieMap.put(key, value); - return this; - } - /** * Check that whether debugging is enabled for this API client. * @@ -525,7 +492,11 @@ public class ApiClient { return accept; } } - return StringUtil.join(accepts, ","); + StringJoiner joiner = new StringJoiner(","); + for(String s : accepts) { + joiner.add(s); + } + return joiner.toString(); } /** @@ -794,15 +765,12 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call * @throws ApiException If fail to serialize the request body object */ - public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); + public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, ApiCallback callback) throws ApiException { + Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, callback); return httpClient.newCall(request); } @@ -816,20 +784,17 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request * @throws ApiException If fail to serialize the request body object */ - public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, ApiCallback callback) throws ApiException { + headerParams.put("X-Algolia-Application-Id", this.appId); + headerParams.put("X-Algolia-API-Key", this.apiKey); final String url = buildUrl(path, queryParams, collectionQueryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); String contentType = (String) headerParams.get("Content-Type"); // ensuring a default content type @@ -840,10 +805,6 @@ public class ApiClient { RequestBody reqBody; if (!HttpMethod.permitsRequestBody(method)) { reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentType)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentType)) { - reqBody = buildRequestBodyMultipart(formParams); } else if (body == null) { if ("DELETE".equals(method)) { // allow calling DELETE without sending a request body @@ -938,36 +899,6 @@ public class ApiClient { } } - /** - * Set cookie parameters to the request builder, including default cookies. - * - * @param cookieParams Cookie parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { - for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - for (Entry param : defaultCookieMap.entrySet()) { - if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - } - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { - headerParams.put("X-Algolia-Application-Id", this.appId); - headerParams.put("X-Algolia-API-Key", this.apiKey); - } - /** * Build a form-encoding request body with the given form parameters. * diff --git a/templates/java/libraries/okhttp-gson/GzipRequestInterceptor.mustache b/templates/java/libraries/okhttp-gson/GzipRequestInterceptor.mustache deleted file mode 100644 index af802483cf0..00000000000 --- a/templates/java/libraries/okhttp-gson/GzipRequestInterceptor.mustache +++ /dev/null @@ -1,72 +0,0 @@ -package {{invokerPackage}}; - -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -import java.io.IOException; - -/** - * Encodes request bodies using gzip. - * - * Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest.newBuilder() - .header("Content-Encoding", "gzip") - .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/templates/java/libraries/okhttp-gson/api.mustache b/templates/java/libraries/okhttp-gson/api.mustache index c5b5de36c0c..c1ae6f9e6cc 100644 --- a/templates/java/libraries/okhttp-gson/api.mustache +++ b/templates/java/libraries/okhttp-gson/api.mustache @@ -37,9 +37,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{#supportStreaming}} -import java.io.InputStream; -{{/supportStreaming}} {{/fullJavaUtil}} {{#operations}} @@ -85,15 +82,7 @@ public class {{classname}} extends ApiClient { {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); - {{#formParams}} - if ({{paramName}} != null) { - localVarFormParams.put("{{baseName}}", {{paramName}}); - } - - {{/formParams}} {{#queryParams}} if ({{paramName}} != null) { {{#collectionFormat}}localVarCollectionQueryParams.addAll(this.parameterToPairs("{{{.}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(this.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); @@ -106,12 +95,6 @@ public class {{classname}} extends ApiClient { } {{/headerParams}} - {{#cookieParams}} - if ({{paramName}} != null) { - localVarCookieParams.put("{{baseName}}", this.parameterToString({{paramName}})); - } - - {{/cookieParams}} final String[] localVarAccepts = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }; @@ -126,8 +109,7 @@ public class {{classname}} extends ApiClient { final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; - return this.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return this.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, _callback); } {{#isDeprecated}} @@ -135,7 +117,6 @@ public class {{classname}} extends ApiClient { {{/isDeprecated}} @SuppressWarnings("rawtypes") private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { - {{^performBeanValidation}} {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { @@ -143,36 +124,7 @@ public class {{classname}} extends ApiClient { } {{/required}}{{/allParams}} - okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); - return localVarCall; - - {{/performBeanValidation}} - {{#performBeanValidation}} - try { - ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); - ExecutableValidator executableValidator = factory.getValidator().forExecutables(); - - Object[] parameterValues = { {{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }; - Method method = this.getClass().getMethod("{{operationId}}WithHttpInfo"{{#allParams}}, {{#isArray}}java.util.List{{/isArray}}{{#isMap}}java.util.Map{{/isMap}}{{^isArray}}{{^isMap}}{{{dataType}}}{{/isMap}}{{/isArray}}.class{{/allParams}}); - Set> violations = executableValidator.validateParameters(this, method, - parameterValues); - - if (violations.size() == 0) { - okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); - return localVarCall; - - } else { - throw new BeanValidationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - - {{/performBeanValidation}} + return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); } {{^vendorExtensions.x-group-parameters}} @@ -202,57 +154,13 @@ public class {{classname}} extends ApiClient { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - {{#vendorExtensions.x-streaming}} - public {{#returnType}}InputStream {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { - {{#returnType}}InputStream localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - return localVarResp;{{/returnType}} - } - {{/vendorExtensions.x-streaming}} - {{^vendorExtensions.x-streaming}} public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { - {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - return localVarResp.getData();{{/returnType}} - } - {{/vendorExtensions.x-streaming}} - {{/vendorExtensions.x-group-parameters}} - - {{^vendorExtensions.x-group-parameters}}/** - * {{&summary}} - * {{¬es}}{{#allParams}} - * @param {{paramName}} {{&description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} - * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - {{#externalDocs}} - * {{&description}} - * @see {{&summary}} Documentation - {{/externalDocs}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-streaming}} InputStream {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); - {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); - return this.executeStream(localVarCall, localVarReturnType);{{/returnType}} + {{#returnType}}Type localVarReturnType = new TypeToken<{{{.}}}>(){}.getType(); + ApiResponse<{{{.}}}> res = this.execute(localVarCall, localVarReturnType); + return res.getData();{{/returnType}}{{^returnType}}return this.execute(localVarCall).getData();{{/returnType}} } - {{/vendorExtensions.x-streaming}}{{^vendorExtensions.x-streaming}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { - okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); - {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); - return this.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return this.execute(localVarCall);{{/returnType}} - } - {{/vendorExtensions.x-streaming}} + {{/vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}/** * {{&summary}} (asynchronously) From 0940f8f2eb9f954e121ac78d11a8c2d786167842 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 15 Dec 2021 15:22:13 +0100 Subject: [PATCH 2/4] remove file, ssl and unused function --- .../com/algolia/ApiClient.java | 331 +- .../algoliasearch-core/com/algolia/JSON.java | 39 - .../com/algolia/search/SearchApi.java | 4990 ++++------------- .../java/CustomInstantDeserializer.mustache | 232 - templates/java/JSON.mustache | 44 +- .../libraries/okhttp-gson/ApiClient.mustache | 308 +- .../java/libraries/okhttp-gson/api.mustache | 274 +- templates/java/model.mustache | 7 - templates/java/pojo.mustache | 2 +- 9 files changed, 1194 insertions(+), 5033 deletions(-) delete mode 100644 templates/java/CustomInstantDeserializer.mustache diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java index 4d71840f372..c89d7d6044f 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java @@ -1,28 +1,17 @@ package com.algolia; -import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.lang.reflect.Type; -import java.net.URLConnection; import java.net.URLEncoder; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; import java.text.DateFormat; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; -import javax.net.ssl.*; import okhttp3.*; import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; @@ -36,10 +25,6 @@ public class ApiClient { private DateFormat dateFormat; - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; - private OkHttpClient httpClient; private JSON json; @@ -49,7 +34,8 @@ public class ApiClient { * Basic constructor for ApiClient */ public ApiClient(String appId, String apiKey) { - init(); + json = new JSON(); + setUserAgent("OpenAPI-Generator/0.1.0/java"); initHttpClient(); this.basePath = "https://" + appId + "-1.algolianet.com"; @@ -71,15 +57,6 @@ private void initHttpClient(List interceptors) { httpClient = builder.build(); } - private void init() { - verifyingSsl = true; - - json = new JSON(); - - // Set default User-Agent. - setUserAgent("OpenAPI-Generator/0.1.0/java"); - } - /** * Get JSON * @@ -100,67 +77,6 @@ public ApiClient setJSON(JSON json) { return this; } - /** - * True if isVerifyingSsl flag is on - * - * @return True if isVerifySsl flag is on - */ - public boolean isVerifyingSsl() { - return verifyingSsl; - } - - /** - * Configure whether to verify certificate and hostname when making https requests. Default to - * true. NOTE: Do NOT set to false in production code, otherwise you would face multiple types of - * cryptographic attacks. - * - * @param verifyingSsl True to verify TLS/SSL connection - * @return ApiClient - */ - public ApiClient setVerifyingSsl(boolean verifyingSsl) { - this.verifyingSsl = verifyingSsl; - applySslSettings(); - return this; - } - - /** - * Get SSL CA cert. - * - * @return Input stream to the SSL CA cert - */ - public InputStream getSslCaCert() { - return sslCaCert; - } - - /** - * Configure the CA certificate to be trusted when making https requests. Use null to reset to - * default. - * - * @param sslCaCert input stream for SSL CA cert - * @return ApiClient - */ - public ApiClient setSslCaCert(InputStream sslCaCert) { - this.sslCaCert = sslCaCert; - applySslSettings(); - return this; - } - - public KeyManager[] getKeyManagers() { - return keyManagers; - } - - /** - * Configure client keys to use for authorization in an SSL session. Use null to reset to default. - * - * @param managers The KeyManagers to use - * @return ApiClient - */ - public ApiClient setKeyManagers(KeyManager[] managers) { - this.keyManagers = managers; - applySslSettings(); - return this; - } - public DateFormat getDateFormat() { return dateFormat; } @@ -170,11 +86,6 @@ public ApiClient setDateFormat(DateFormat dateFormat) { return this; } - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - this.json.setSqlDateFormat(dateFormat); - return this; - } - public ApiClient setLenientOnJson(boolean lenientOnJson) { this.json.setLenientOnJson(lenientOnJson); return this; @@ -459,16 +370,6 @@ public String collectionPathParameterToString( return sb.substring(delimiter.length()); } - /** - * Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif - * - * @param filename The filename to be sanitized - * @return The sanitized filename - */ - public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); - } - /** * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; * charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also default to JSON @@ -482,50 +383,6 @@ public boolean isJsonMime(String mime) { return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); } - /** - * Select the Accept header's value from the given accepts array: if JSON exists in the given - * array, use it; otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, null will be returned (not to - * set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - StringJoiner joiner = new StringJoiner(","); - for (String s : accepts) { - joiner.add(s); - } - return joiner.toString(); - } - - /** - * Select the Content-Type header's value from the given array: if JSON exists in the given array, - * use it; otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, or matches "any", JSON - * will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { - return "application/json"; - } - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - return contentTypes[0]; - } - /** * Escape the given string to be used as URL query value. * @@ -551,7 +408,6 @@ public String escapeString(String str) { * @throws ApiException If fail to deserialize response body, i.e. cannot read response body or * the Content-Type of the response is not supported. */ - @SuppressWarnings("unchecked") public T deserialize(Response response, Type returnType) throws ApiException { if (response == null || returnType == null) { @@ -616,9 +472,6 @@ public RequestBody serialize(Object obj, String contentType) if (obj instanceof byte[]) { // Binary (byte array) body parameter support. return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); - } else if (obj instanceof File) { - // File body parameter support. - return RequestBody.create((File) obj, MediaType.parse(contentType)); } else if (isJsonMime(contentType)) { String content; if (obj != null) { @@ -691,7 +544,6 @@ public void executeAsync(Call call, ApiCallback callback) { * @param callback ApiCallback * @see #execute(Call, Type) */ - @SuppressWarnings("unchecked") public void executeAsync( Call call, final Type returnType, @@ -797,7 +649,6 @@ public T handleResponse(Response response, Type returnType) * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and * "DELETE" * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters * @param callback Callback for upload/download progress @@ -808,7 +659,6 @@ public Call buildCall( String path, String method, List queryParams, - List collectionQueryParams, Object body, Map headerParams, ApiCallback callback @@ -817,7 +667,6 @@ public Call buildCall( path, method, queryParams, - collectionQueryParams, body, headerParams, callback @@ -833,7 +682,6 @@ public Call buildCall( * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and * "DELETE" * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters * @param callback Callback for upload/download progress @@ -844,7 +692,6 @@ public Request buildRequest( String path, String method, List queryParams, - List collectionQueryParams, Object body, Map headerParams, ApiCallback callback @@ -852,7 +699,7 @@ public Request buildRequest( headerParams.put("X-Algolia-Application-Id", this.appId); headerParams.put("X-Algolia-API-Key", this.apiKey); - final String url = buildUrl(path, queryParams, collectionQueryParams); + final String url = buildUrl(path, queryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); @@ -901,14 +748,9 @@ public Request buildRequest( * * @param path The sub path * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters * @return The full URL */ - public String buildUrl( - String path, - List queryParams, - List collectionQueryParams - ) { + public String buildUrl(String path, List queryParams) { final StringBuilder url = new StringBuilder(); url.append(basePath).append(path); @@ -932,23 +774,6 @@ public String buildUrl( } } - if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { - String prefix = url.toString().contains("?") ? "&" : "?"; - for (Pair param : collectionQueryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - // collection query parameter value already escaped as part of parameterToPairs - url.append(escapeString(param.getName())).append("=").append(value); - } - } - } - return url.toString(); } @@ -991,58 +816,6 @@ public RequestBody buildRequestBodyFormEncoding( return formBuilder.build(); } - /** - * Build a multipart (file uploading) request body with the given form parameters, which could - * contain text fields and file fields. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyMultipart(Map formParams) { - MultipartBody.Builder mpBuilder = new MultipartBody.Builder() - .setType(MultipartBody.FORM); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - Headers partHeaders = Headers.of( - "Content-Disposition", - "form-data; name=\"" + - param.getKey() + - "\"; filename=\"" + - file.getName() + - "\"" - ); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } else { - Headers partHeaders = Headers.of( - "Content-Disposition", - "form-data; name=\"" + param.getKey() + "\"" - ); - mpBuilder.addPart( - partHeaders, - RequestBody.create(parameterToString(param.getValue()), null) - ); - } - } - return mpBuilder.build(); - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - public String guessContentTypeFromFile(File file) { - String contentType = URLConnection.guessContentTypeFromName(file.getName()); - if (contentType == null) { - return "application/octet-stream"; - } else { - return contentType; - } - } - /** * Get network interceptor to add it to the httpClient to track download progress for async * requests. @@ -1064,100 +837,4 @@ public Response intercept(Interceptor.Chain chain) throws IOException { } }; } - - /** - * Apply SSL related settings to httpClient according to the current values of verifyingSsl and - * sslCaCert. - */ - private void applySslSettings() { - try { - TrustManager[] trustManagers; - HostnameVerifier hostnameVerifier; - if (!verifyingSsl) { - trustManagers = - new TrustManager[] { - new X509TrustManager() { - @Override - public void checkClientTrusted( - java.security.cert.X509Certificate[] chain, - String authType - ) throws CertificateException {} - - @Override - public void checkServerTrusted( - java.security.cert.X509Certificate[] chain, - String authType - ) throws CertificateException {} - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[] {}; - } - }, - }; - hostnameVerifier = - new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - } else { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance( - TrustManagerFactory.getDefaultAlgorithm() - ); - - if (sslCaCert == null) { - trustManagerFactory.init((KeyStore) null); - } else { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance( - "X.509" - ); - Collection certificates = certificateFactory.generateCertificates( - sslCaCert - ); - if (certificates.isEmpty()) { - throw new IllegalArgumentException( - "expected non-empty set of trusted certificates" - ); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - trustManagerFactory.init(caKeyStore); - } - trustManagers = trustManagerFactory.getTrustManagers(); - hostnameVerifier = OkHostnameVerifier.INSTANCE; - } - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = - httpClient - .newBuilder() - .sslSocketFactory( - sslContext.getSocketFactory(), - (X509TrustManager) trustManagers[0] - ) - .hostnameVerifier(hostnameVerifier) - .build(); - } catch (GeneralSecurityException e) { - throw new RuntimeException(e); - } - } - - private KeyStore newEmptyKeyStore(char[] password) - throws GeneralSecurityException { - try { - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, password); - return keyStore; - } catch (IOException e) { - throw new AssertionError(e); - } - } } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/JSON.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/JSON.java index fff9b8547c2..a9dc92333f0 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/JSON.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/JSON.java @@ -1,9 +1,7 @@ package com.algolia; -import com.algolia.model.*; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; import com.google.gson.internal.bind.util.ISO8601Utils; @@ -20,7 +18,6 @@ import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; -import java.util.Map; import okio.ByteString; public class JSON { @@ -33,47 +30,12 @@ public class JSON { private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - @SuppressWarnings("unchecked") public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder(); GsonBuilder builder = fireBuilder.createGsonBuilder(); return builder; } - private static String getDiscriminatorValue( - JsonElement readElement, - String discriminatorField - ) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException( - "missing discriminator field: <" + discriminatorField + ">" - ); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator - * value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator( - Map classByDiscriminatorValue, - String discriminatorValue - ) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException( - "cannot determine model class of name: <" + discriminatorValue + ">" - ); - } - return clazz; - } - public JSON() { gson = createGson() @@ -128,7 +90,6 @@ public String serialize(Object obj) { * @param returnType The type to deserialize into * @return The deserialized Java object */ - @SuppressWarnings("unchecked") public T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java index dad5d9398dd..502183a2b7f 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java @@ -66,6 +66,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import okhttp3.Call; public class SearchApi extends ApiClient { @@ -80,51 +81,25 @@ public SearchApi(String appId, String apiKey) { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call addApiKeyCall(ApiKey apiKey, final ApiCallback _callback) + */ + private Call addApiKeyCall(ApiKey apiKey, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = apiKey; + Object body = apiKey; // create path and map variables - String localVarPath = "/1/keys"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + String path = "/1/keys"; - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call addApiKeyValidateBeforeCall( + private Call addApiKeyValidateBeforeCall( ApiKey apiKey, final ApiCallback _callback ) throws ApiException { @@ -145,21 +120,11 @@ private okhttp3.Call addApiKeyValidateBeforeCall( * @return AddApiKeyResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public AddApiKeyResponse addApiKey(ApiKey apiKey) throws ApiException { - okhttp3.Call localVarCall = addApiKeyValidateBeforeCall(apiKey, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = addApiKeyValidateBeforeCall(apiKey, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -171,24 +136,15 @@ public AddApiKeyResponse addApiKey(ApiKey apiKey) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call addApiKeyAsync( + */ + public Call addApiKeyAsync( ApiKey apiKey, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = addApiKeyValidateBeforeCall(apiKey, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = addApiKeyValidateBeforeCall(apiKey, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -200,26 +156,17 @@ public okhttp3.Call addApiKeyAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call addOrUpdateObjectCall( + */ + private Call addOrUpdateObjectCall( String indexName, String objectID, Map requestBody, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = requestBody; + Object body = requestBody; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -229,34 +176,17 @@ public okhttp3.Call addOrUpdateObjectCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "PUT", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call addOrUpdateObjectValidateBeforeCall( + private Call addOrUpdateObjectValidateBeforeCall( String indexName, String objectID, Map requestBody, @@ -297,31 +227,22 @@ private okhttp3.Call addOrUpdateObjectValidateBeforeCall( * @return UpdatedAtWithObjectIdResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtWithObjectIdResponse addOrUpdateObject( String indexName, String objectID, Map requestBody ) throws ApiException { - okhttp3.Call localVarCall = addOrUpdateObjectValidateBeforeCall( + Call call = addOrUpdateObjectValidateBeforeCall( indexName, objectID, requestBody, null ); - Type localVarReturnType = new TypeToken() {} + Type returnType = new TypeToken() {} .getType(); ApiResponse res = - this.execute(localVarCall, localVarReturnType); + this.execute(call, returnType); return res.getData(); } @@ -336,32 +257,23 @@ public UpdatedAtWithObjectIdResponse addOrUpdateObject( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call addOrUpdateObjectAsync( + */ + public Call addOrUpdateObjectAsync( String indexName, String objectID, Map requestBody, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = addOrUpdateObjectValidateBeforeCall( + Call call = addOrUpdateObjectValidateBeforeCall( indexName, objectID, requestBody, _callback ); - Type localVarReturnType = new TypeToken() {} + Type returnType = new TypeToken() {} .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -371,49 +283,25 @@ public okhttp3.Call addOrUpdateObjectAsync( * @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 appendSourceCall( - Source source, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = source; + private Call appendSourceCall(Source source, final ApiCallback _callback) + throws ApiException { + Object body = source; // create path and map variables - String localVarPath = "/1/security/sources/append"; + String path = "/1/security/sources/append"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call appendSourceValidateBeforeCall( + private Call appendSourceValidateBeforeCall( Source source, final ApiCallback _callback ) throws ApiException { @@ -434,17 +322,11 @@ private okhttp3.Call appendSourceValidateBeforeCall( * @return CreatedAtResponse * @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 CreatedAtResponse appendSource(Source source) throws ApiException { - okhttp3.Call localVarCall = appendSourceValidateBeforeCall(source, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = appendSourceValidateBeforeCall(source, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -455,23 +337,15 @@ public CreatedAtResponse appendSource(Source source) throws ApiException { * @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 appendSourceAsync( + public Call appendSourceAsync( Source source, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = appendSourceValidateBeforeCall( - source, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = appendSourceValidateBeforeCall(source, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -482,60 +356,34 @@ public okhttp3.Call appendSourceAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call assignUserIdCall( + */ + private Call assignUserIdCall( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = assignUserIdObject; + Object body = assignUserIdObject; // create path and map variables - String localVarPath = "/1/clusters/mapping"; + String path = "/1/clusters/mapping"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (xAlgoliaUserID != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("X-Algolia-User-ID", xAlgoliaUserID) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call assignUserIdValidateBeforeCall( + private Call assignUserIdValidateBeforeCall( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject, final ApiCallback _callback @@ -568,28 +416,18 @@ private okhttp3.Call assignUserIdValidateBeforeCall( * @return CreatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public CreatedAtResponse assignUserId( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject ) throws ApiException { - okhttp3.Call localVarCall = assignUserIdValidateBeforeCall( + Call call = assignUserIdValidateBeforeCall( xAlgoliaUserID, assignUserIdObject, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -604,29 +442,20 @@ public CreatedAtResponse assignUserId( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call assignUserIdAsync( + */ + public Call assignUserIdAsync( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = assignUserIdValidateBeforeCall( + Call call = assignUserIdValidateBeforeCall( xAlgoliaUserID, assignUserIdObject, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -637,58 +466,32 @@ public okhttp3.Call assignUserIdAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchCall( + */ + private Call batchCall( String indexName, BatchWriteObject batchWriteObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = batchWriteObject; + Object body = batchWriteObject; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/batch".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call batchValidateBeforeCall( + private Call batchValidateBeforeCall( String indexName, BatchWriteObject batchWriteObject, final ApiCallback _callback @@ -718,28 +521,14 @@ private okhttp3.Call batchValidateBeforeCall( * @return BatchResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public BatchResponse batch( String indexName, BatchWriteObject batchWriteObject ) throws ApiException { - okhttp3.Call localVarCall = batchValidateBeforeCall( - indexName, - batchWriteObject, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = batchValidateBeforeCall(indexName, batchWriteObject, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -751,29 +540,16 @@ public BatchResponse batch( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchAsync( + */ + public Call batchAsync( String indexName, BatchWriteObject batchWriteObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = batchValidateBeforeCall( - indexName, - batchWriteObject, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = batchValidateBeforeCall(indexName, batchWriteObject, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -784,60 +560,34 @@ public okhttp3.Call batchAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchAssignUserIdsCall( + */ + private Call batchAssignUserIdsCall( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = batchAssignUserIdsObject; + Object body = batchAssignUserIdsObject; // create path and map variables - String localVarPath = "/1/clusters/mapping/batch"; + String path = "/1/clusters/mapping/batch"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (xAlgoliaUserID != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("X-Algolia-User-ID", xAlgoliaUserID) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call batchAssignUserIdsValidateBeforeCall( + private Call batchAssignUserIdsValidateBeforeCall( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject, final ApiCallback _callback @@ -874,28 +624,18 @@ private okhttp3.Call batchAssignUserIdsValidateBeforeCall( * @return CreatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public CreatedAtResponse batchAssignUserIds( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject ) throws ApiException { - okhttp3.Call localVarCall = batchAssignUserIdsValidateBeforeCall( + Call call = batchAssignUserIdsValidateBeforeCall( xAlgoliaUserID, batchAssignUserIdsObject, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -909,29 +649,20 @@ public CreatedAtResponse batchAssignUserIds( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchAssignUserIdsAsync( + */ + public Call batchAssignUserIdsAsync( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = batchAssignUserIdsValidateBeforeCall( + Call call = batchAssignUserIdsValidateBeforeCall( xAlgoliaUserID, batchAssignUserIdsObject, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -942,58 +673,32 @@ public okhttp3.Call batchAssignUserIdsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchDictionaryEntriesCall( + */ + private Call batchDictionaryEntriesCall( String dictionaryName, BatchDictionaryEntries batchDictionaryEntries, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = batchDictionaryEntries; + Object body = batchDictionaryEntries; // create path and map variables - String localVarPath = + String path = "/1/dictionaries/{dictionaryName}/batch".replaceAll( "\\{" + "dictionaryName" + "\\}", this.escapeString(dictionaryName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call batchDictionaryEntriesValidateBeforeCall( + private Call batchDictionaryEntriesValidateBeforeCall( String dictionaryName, BatchDictionaryEntries batchDictionaryEntries, final ApiCallback _callback @@ -1029,28 +734,18 @@ private okhttp3.Call batchDictionaryEntriesValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse batchDictionaryEntries( String dictionaryName, BatchDictionaryEntries batchDictionaryEntries ) throws ApiException { - okhttp3.Call localVarCall = batchDictionaryEntriesValidateBeforeCall( + Call call = batchDictionaryEntriesValidateBeforeCall( dictionaryName, batchDictionaryEntries, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -1062,29 +757,20 @@ public UpdatedAtResponse batchDictionaryEntries( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchDictionaryEntriesAsync( + */ + public Call batchDictionaryEntriesAsync( String dictionaryName, BatchDictionaryEntries batchDictionaryEntries, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = batchDictionaryEntriesValidateBeforeCall( + Call call = batchDictionaryEntriesValidateBeforeCall( dictionaryName, batchDictionaryEntries, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -1099,72 +785,46 @@ public okhttp3.Call batchDictionaryEntriesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchRulesCall( + */ + private Call batchRulesCall( String indexName, List rule, Boolean forwardToReplicas, Boolean clearExistingRules, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = rule; + Object body = rule; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/rules/batch".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } if (clearExistingRules != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("clearExistingRules", clearExistingRules) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call batchRulesValidateBeforeCall( + private Call batchRulesValidateBeforeCall( String indexName, List rule, Boolean forwardToReplicas, @@ -1206,15 +866,6 @@ private okhttp3.Call batchRulesValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse batchRules( String indexName, @@ -1222,16 +873,15 @@ public UpdatedAtResponse batchRules( Boolean forwardToReplicas, Boolean clearExistingRules ) throws ApiException { - okhttp3.Call localVarCall = batchRulesValidateBeforeCall( + Call call = batchRulesValidateBeforeCall( indexName, rule, forwardToReplicas, clearExistingRules, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -1247,33 +897,24 @@ public UpdatedAtResponse batchRules( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call batchRulesAsync( + */ + public Call batchRulesAsync( String indexName, List rule, Boolean forwardToReplicas, Boolean clearExistingRules, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = batchRulesValidateBeforeCall( + Call call = batchRulesValidateBeforeCall( indexName, rule, forwardToReplicas, clearExistingRules, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -1284,58 +925,32 @@ public okhttp3.Call batchRulesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call browseCall( + */ + private Call browseCall( String indexName, BrowseRequest browseRequest, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = browseRequest; + Object body = browseRequest; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/browse".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call browseValidateBeforeCall( + private Call browseValidateBeforeCall( String indexName, BrowseRequest browseRequest, final ApiCallback _callback @@ -1364,66 +979,40 @@ private okhttp3.Call browseValidateBeforeCall( * @return BrowseResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public BrowseResponse browse(String indexName, BrowseRequest browseRequest) throws ApiException { - okhttp3.Call localVarCall = browseValidateBeforeCall( - indexName, - browseRequest, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = browseValidateBeforeCall(indexName, browseRequest, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } /** * Retrieve all index content. (asynchronously) This method allows you to retrieve all index * content. It can retrieve up to 1,000 records per call and supports full text search and - * filters. For performance reasons, some features are not supported, including `distinct`, - * sorting by `typos`, `words` or `geo distance`. When there is more content to be browsed, the - * response contains a cursor field. This cursor has to be passed to the subsequent call to browse - * in order to get the next page of results. When the end of the index has been reached, the - * cursor field is absent from the response. + * filters. For performance reasons, some features are not supported, including + * `distinct`, sorting by `typos`, `words` or `geo + * distance`. When there is more content to be browsed, the response contains a cursor field. + * This cursor has to be passed to the subsequent call to browse in order to get the next page of + * results. When the end of the index has been reached, the cursor field is absent from the + * response. * * @param indexName The index in which to perform the request. (required) * @param browseRequest (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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call browseAsync( + */ + public Call browseAsync( String indexName, BrowseRequest browseRequest, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = browseValidateBeforeCall( - indexName, - browseRequest, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = browseValidateBeforeCall(indexName, browseRequest, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -1435,65 +1024,38 @@ public okhttp3.Call browseAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call clearAllSynonymsCall( + */ + private Call clearAllSynonymsCall( String indexName, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/synonyms/clear".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call clearAllSynonymsValidateBeforeCall( + private Call clearAllSynonymsValidateBeforeCall( String indexName, Boolean forwardToReplicas, final ApiCallback _callback @@ -1517,28 +1079,18 @@ private okhttp3.Call clearAllSynonymsValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse clearAllSynonyms( String indexName, Boolean forwardToReplicas ) throws ApiException { - okhttp3.Call localVarCall = clearAllSynonymsValidateBeforeCall( + Call call = clearAllSynonymsValidateBeforeCall( indexName, forwardToReplicas, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -1551,29 +1103,20 @@ public UpdatedAtResponse clearAllSynonyms( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call clearAllSynonymsAsync( + */ + public Call clearAllSynonymsAsync( String indexName, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = clearAllSynonymsValidateBeforeCall( + Call call = clearAllSynonymsValidateBeforeCall( indexName, forwardToReplicas, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -1583,58 +1126,29 @@ public okhttp3.Call clearAllSynonymsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call clearObjectsCall( - String indexName, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = null; + */ + private Call clearObjectsCall(String indexName, final ApiCallback _callback) + throws ApiException { + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/clear".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call clearObjectsValidateBeforeCall( + private Call clearObjectsValidateBeforeCall( String indexName, final ApiCallback _callback ) throws ApiException { @@ -1656,53 +1170,31 @@ private okhttp3.Call clearObjectsValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse clearObjects(String indexName) throws ApiException { - okhttp3.Call localVarCall = clearObjectsValidateBeforeCall(indexName, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = clearObjectsValidateBeforeCall(indexName, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } /** - * clear all objects from an index. (asynchronously) Delete an index's content, but leave settings - * and index-specific API keys untouched. + * clear all objects from an index. (asynchronously) Delete an index's content, but leave + * settings and index-specific API keys untouched. * * @param indexName The index in which to perform the request. (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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call clearObjectsAsync( + */ + public Call clearObjectsAsync( String indexName, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = clearObjectsValidateBeforeCall( - indexName, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = clearObjectsValidateBeforeCall(indexName, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -1714,65 +1206,38 @@ public okhttp3.Call clearObjectsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call clearRulesCall( + */ + private Call clearRulesCall( String indexName, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/rules/clear".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call clearRulesValidateBeforeCall( + private Call clearRulesValidateBeforeCall( String indexName, Boolean forwardToReplicas, final ApiCallback _callback @@ -1796,28 +1261,18 @@ private okhttp3.Call clearRulesValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse clearRules( String indexName, Boolean forwardToReplicas ) throws ApiException { - okhttp3.Call localVarCall = clearRulesValidateBeforeCall( + Call call = clearRulesValidateBeforeCall( indexName, forwardToReplicas, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -1830,29 +1285,20 @@ public UpdatedAtResponse clearRules( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call clearRulesAsync( + */ + public Call clearRulesAsync( String indexName, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = clearRulesValidateBeforeCall( + Call call = clearRulesValidateBeforeCall( indexName, forwardToReplicas, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -1862,56 +1308,36 @@ public okhttp3.Call clearRulesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteApiKeyCall(String key, final ApiCallback _callback) + */ + private Call deleteApiKeyCall(String key, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/keys/{key}".replaceAll( "\\{" + "key" + "\\}", this.escapeString(key.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); return this.buildCall( - localVarPath, + path, "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, + queryParams, + body, + headers, _callback ); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteApiKeyValidateBeforeCall( + private Call deleteApiKeyValidateBeforeCall( String key, final ApiCallback _callback ) throws ApiException { @@ -1932,22 +1358,11 @@ private okhttp3.Call deleteApiKeyValidateBeforeCall( * @return DeleteApiKeyResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public DeleteApiKeyResponse deleteApiKey(String key) throws ApiException { - okhttp3.Call localVarCall = deleteApiKeyValidateBeforeCall(key, null); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = deleteApiKeyValidateBeforeCall(key, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -1958,25 +1373,15 @@ public DeleteApiKeyResponse deleteApiKey(String key) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteApiKeyAsync( + */ + public Call deleteApiKeyAsync( String key, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = deleteApiKeyValidateBeforeCall(key, _callback); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = deleteApiKeyValidateBeforeCall(key, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -1987,58 +1392,32 @@ public okhttp3.Call deleteApiKeyAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteByCall( + */ + private Call deleteByCall( String indexName, SearchParams searchParams, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = searchParams; + Object body = searchParams; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/deleteByQuery".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteByValidateBeforeCall( + private Call deleteByValidateBeforeCall( String indexName, SearchParams searchParams, final ApiCallback _callback @@ -2070,64 +1449,37 @@ private okhttp3.Call deleteByValidateBeforeCall( * @return DeletedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public DeletedAtResponse deleteBy( String indexName, SearchParams searchParams ) throws ApiException { - okhttp3.Call localVarCall = deleteByValidateBeforeCall( - indexName, - searchParams, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = deleteByValidateBeforeCall(indexName, searchParams, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } /** * Delete all records matching the query. (asynchronously) Remove all objects matching a filter * (including geo filters). This method enables you to delete one or more objects based on filters - * (numeric, facet, tag or geo queries). It doesn't accept empty filters or a query. + * (numeric, facet, tag or geo queries). It doesn't accept empty filters or a query. * * @param indexName The index in which to perform the request. (required) * @param searchParams (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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteByAsync( + */ + public Call deleteByAsync( String indexName, SearchParams searchParams, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = deleteByValidateBeforeCall( - indexName, - searchParams, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = deleteByValidateBeforeCall(indexName, searchParams, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -2137,58 +1489,36 @@ public okhttp3.Call deleteByAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteIndexCall( - String indexName, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = null; + */ + private Call deleteIndexCall(String indexName, final ApiCallback _callback) + throws ApiException { + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); return this.buildCall( - localVarPath, + path, "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, + queryParams, + body, + headers, _callback ); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteIndexValidateBeforeCall( + private Call deleteIndexValidateBeforeCall( String indexName, final ApiCallback _callback ) throws ApiException { @@ -2209,21 +1539,11 @@ private okhttp3.Call deleteIndexValidateBeforeCall( * @return DeletedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public DeletedAtResponse deleteIndex(String indexName) throws ApiException { - okhttp3.Call localVarCall = deleteIndexValidateBeforeCall(indexName, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = deleteIndexValidateBeforeCall(indexName, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -2234,27 +1554,15 @@ public DeletedAtResponse deleteIndex(String indexName) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteIndexAsync( + */ + public Call deleteIndexAsync( String indexName, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = deleteIndexValidateBeforeCall( - indexName, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = deleteIndexValidateBeforeCall(indexName, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -2265,25 +1573,16 @@ public okhttp3.Call deleteIndexAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteObjectCall( + */ + private Call deleteObjectCall( String indexName, String objectID, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -2293,35 +1592,24 @@ public okhttp3.Call deleteObjectCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); return this.buildCall( - localVarPath, + path, "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, + queryParams, + body, + headers, _callback ); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteObjectValidateBeforeCall( + private Call deleteObjectValidateBeforeCall( String indexName, String objectID, final ApiCallback _callback @@ -2351,26 +1639,12 @@ private okhttp3.Call deleteObjectValidateBeforeCall( * @return DeletedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public DeletedAtResponse deleteObject(String indexName, String objectID) throws ApiException { - okhttp3.Call localVarCall = deleteObjectValidateBeforeCall( - indexName, - objectID, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = deleteObjectValidateBeforeCall(indexName, objectID, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -2382,29 +1656,16 @@ public DeletedAtResponse deleteObject(String indexName, String objectID) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteObjectAsync( + */ + public Call deleteObjectAsync( String indexName, String objectID, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = deleteObjectValidateBeforeCall( - indexName, - objectID, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = deleteObjectValidateBeforeCall(indexName, objectID, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -2417,26 +1678,17 @@ public okhttp3.Call deleteObjectAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteRuleCall( + */ + private Call deleteRuleCall( String indexName, String objectID, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/rules/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -2446,41 +1698,30 @@ public okhttp3.Call deleteRuleCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); return this.buildCall( - localVarPath, + path, "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, + queryParams, + body, + headers, _callback ); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRuleValidateBeforeCall( + private Call deleteRuleValidateBeforeCall( String indexName, String objectID, Boolean forwardToReplicas, @@ -2513,30 +1754,20 @@ private okhttp3.Call deleteRuleValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse deleteRule( String indexName, String objectID, Boolean forwardToReplicas ) throws ApiException { - okhttp3.Call localVarCall = deleteRuleValidateBeforeCall( + Call call = deleteRuleValidateBeforeCall( indexName, objectID, forwardToReplicas, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -2550,31 +1781,22 @@ public UpdatedAtResponse deleteRule( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteRuleAsync( + */ + public Call deleteRuleAsync( String indexName, String objectID, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = deleteRuleValidateBeforeCall( + Call call = deleteRuleValidateBeforeCall( indexName, objectID, forwardToReplicas, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -2584,54 +1806,36 @@ public okhttp3.Call deleteRuleAsync( * @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 deleteSourceCall( - String source, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = null; + private Call deleteSourceCall(String source, final ApiCallback _callback) + throws ApiException { + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/security/sources/{source}".replaceAll( "\\{" + "source" + "\\}", this.escapeString(source.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); return this.buildCall( - localVarPath, + path, "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, + queryParams, + body, + headers, _callback ); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSourceValidateBeforeCall( + private Call deleteSourceValidateBeforeCall( String source, final ApiCallback _callback ) throws ApiException { @@ -2652,18 +1856,11 @@ private okhttp3.Call deleteSourceValidateBeforeCall( * @return DeleteSourceResponse * @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 DeleteSourceResponse deleteSource(String source) throws ApiException { - okhttp3.Call localVarCall = deleteSourceValidateBeforeCall(source, null); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = deleteSourceValidateBeforeCall(source, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -2674,24 +1871,15 @@ public DeleteSourceResponse deleteSource(String source) throws ApiException { * @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 deleteSourceAsync( + public Call deleteSourceAsync( String source, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = deleteSourceValidateBeforeCall( - source, - _callback - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = deleteSourceValidateBeforeCall(source, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -2704,26 +1892,17 @@ public okhttp3.Call deleteSourceAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteSynonymCall( + */ + private Call deleteSynonymCall( String indexName, String objectID, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/synonyms/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -2733,41 +1912,30 @@ public okhttp3.Call deleteSynonymCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); return this.buildCall( - localVarPath, + path, "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, + queryParams, + body, + headers, _callback ); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSynonymValidateBeforeCall( + private Call deleteSynonymValidateBeforeCall( String indexName, String objectID, Boolean forwardToReplicas, @@ -2800,30 +1968,20 @@ private okhttp3.Call deleteSynonymValidateBeforeCall( * @return DeletedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public DeletedAtResponse deleteSynonym( String indexName, String objectID, Boolean forwardToReplicas ) throws ApiException { - okhttp3.Call localVarCall = deleteSynonymValidateBeforeCall( + Call call = deleteSynonymValidateBeforeCall( indexName, objectID, forwardToReplicas, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -2838,31 +1996,22 @@ public DeletedAtResponse deleteSynonym( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call deleteSynonymAsync( + */ + public Call deleteSynonymAsync( String indexName, String objectID, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = deleteSynonymValidateBeforeCall( + Call call = deleteSynonymValidateBeforeCall( indexName, objectID, forwardToReplicas, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -2872,56 +2021,29 @@ public okhttp3.Call deleteSynonymAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getApiKeyCall(String key, final ApiCallback _callback) + */ + private Call getApiKeyCall(String key, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/keys/{key}".replaceAll( "\\{" + "key" + "\\}", this.escapeString(key.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiKeyValidateBeforeCall( + private Call getApiKeyValidateBeforeCall( String key, final ApiCallback _callback ) throws ApiException { @@ -2942,20 +2064,11 @@ private okhttp3.Call getApiKeyValidateBeforeCall( * @return KeyObject * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public KeyObject getApiKey(String key) throws ApiException { - okhttp3.Call localVarCall = getApiKeyValidateBeforeCall(key, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = this.execute(localVarCall, localVarReturnType); + Call call = getApiKeyValidateBeforeCall(key, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -2966,24 +2079,15 @@ public KeyObject getApiKey(String key) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getApiKeyAsync( + */ + public Call getApiKeyAsync( String key, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getApiKeyValidateBeforeCall(key, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getApiKeyValidateBeforeCall(key, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -2992,52 +2096,25 @@ public okhttp3.Call getApiKeyAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getDictionaryLanguagesCall(final ApiCallback _callback) + */ + private Call getDictionaryLanguagesCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/dictionaries/*/languages"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + String path = "/1/dictionaries/*/languages"; - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getDictionaryLanguagesValidateBeforeCall( + private Call getDictionaryLanguagesValidateBeforeCall( final ApiCallback _callback ) throws ApiException { return getDictionaryLanguagesCall(_callback); @@ -3049,22 +2126,11 @@ private okhttp3.Call getDictionaryLanguagesValidateBeforeCall( * @return Map<String, Languages> * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public Map getDictionaryLanguages() throws ApiException { - okhttp3.Call localVarCall = getDictionaryLanguagesValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>() {} - .getType(); - ApiResponse> res = - this.execute(localVarCall, localVarReturnType); + Call call = getDictionaryLanguagesValidateBeforeCall(null); + Type returnType = new TypeToken>() {}.getType(); + ApiResponse> res = this.execute(call, returnType); return res.getData(); } @@ -3075,26 +2141,14 @@ public Map getDictionaryLanguages() throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getDictionaryLanguagesAsync( + */ + public Call getDictionaryLanguagesAsync( final ApiCallback> _callback ) throws ApiException { - okhttp3.Call localVarCall = getDictionaryLanguagesValidateBeforeCall( - _callback - ); - Type localVarReturnType = new TypeToken>() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getDictionaryLanguagesValidateBeforeCall(_callback); + Type returnType = new TypeToken>() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -3103,52 +2157,25 @@ public okhttp3.Call getDictionaryLanguagesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getDictionarySettingsCall(final ApiCallback _callback) + */ + private Call getDictionarySettingsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/dictionaries/*/settings"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + String path = "/1/dictionaries/*/settings"; - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getDictionarySettingsValidateBeforeCall( + private Call getDictionarySettingsValidateBeforeCall( final ApiCallback _callback ) throws ApiException { return getDictionarySettingsCall(_callback); @@ -3161,23 +2188,14 @@ private okhttp3.Call getDictionarySettingsValidateBeforeCall( * @return GetDictionarySettingsResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public GetDictionarySettingsResponse getDictionarySettings() throws ApiException { - okhttp3.Call localVarCall = getDictionarySettingsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {} + Call call = getDictionarySettingsValidateBeforeCall(null); + Type returnType = new TypeToken() {} .getType(); ApiResponse res = - this.execute(localVarCall, localVarReturnType); + this.execute(call, returnType); return res.getData(); } @@ -3188,26 +2206,15 @@ public GetDictionarySettingsResponse getDictionarySettings() * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getDictionarySettingsAsync( + */ + public Call getDictionarySettingsAsync( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getDictionarySettingsValidateBeforeCall( - _callback - ); - Type localVarReturnType = new TypeToken() {} + Call call = getDictionarySettingsValidateBeforeCall(_callback); + Type returnType = new TypeToken() {} .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -3224,73 +2231,46 @@ public okhttp3.Call getDictionarySettingsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getLogsCall( + */ + private Call getLogsCall( Integer offset, Integer length, String indexName, String type, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/logs"; + String path = "/1/logs"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (offset != null) { - localVarQueryParams.addAll(this.parameterToPair("offset", offset)); + queryParams.addAll(this.parameterToPair("offset", offset)); } if (length != null) { - localVarQueryParams.addAll(this.parameterToPair("length", length)); + queryParams.addAll(this.parameterToPair("length", length)); } if (indexName != null) { - localVarQueryParams.addAll(this.parameterToPair("indexName", indexName)); + queryParams.addAll(this.parameterToPair("indexName", indexName)); } if (type != null) { - localVarQueryParams.addAll(this.parameterToPair("type", type)); - } - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); + queryParams.addAll(this.parameterToPair("type", type)); } - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getLogsValidateBeforeCall( + private Call getLogsValidateBeforeCall( Integer offset, Integer length, String indexName, @@ -3314,15 +2294,6 @@ private okhttp3.Call getLogsValidateBeforeCall( * @return GetLogsResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public GetLogsResponse getLogs( Integer offset, @@ -3330,16 +2301,15 @@ public GetLogsResponse getLogs( String indexName, String type ) throws ApiException { - okhttp3.Call localVarCall = getLogsValidateBeforeCall( + Call call = getLogsValidateBeforeCall( offset, length, indexName, type, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -3357,33 +2327,24 @@ public GetLogsResponse getLogs( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getLogsAsync( + */ + public Call getLogsAsync( Integer offset, Integer length, String indexName, String type, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getLogsValidateBeforeCall( + Call call = getLogsValidateBeforeCall( offset, length, indexName, type, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -3395,26 +2356,17 @@ public okhttp3.Call getLogsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getObjectCall( + */ + private Call getObjectCall( String indexName, String objectID, List attributesToRetrieve, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -3424,45 +2376,23 @@ public okhttp3.Call getObjectCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (attributesToRetrieve != null) { - localVarCollectionQueryParams.addAll( - this.parameterToPairs( - "csv", - "attributesToRetrieve", - attributesToRetrieve - ) + queryParams.addAll( + this.parameterToPair("attributesToRetrieve", attributesToRetrieve) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getObjectValidateBeforeCall( + private Call getObjectValidateBeforeCall( String indexName, String objectID, List attributesToRetrieve, @@ -3494,30 +2424,20 @@ private okhttp3.Call getObjectValidateBeforeCall( * @return Map<String, String> * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public Map getObject( String indexName, String objectID, List attributesToRetrieve ) throws ApiException { - okhttp3.Call localVarCall = getObjectValidateBeforeCall( + Call call = getObjectValidateBeforeCall( indexName, objectID, attributesToRetrieve, null ); - Type localVarReturnType = new TypeToken>() {}.getType(); - ApiResponse> res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken>() {}.getType(); + ApiResponse> res = this.execute(call, returnType); return res.getData(); } @@ -3530,31 +2450,22 @@ public Map getObject( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getObjectAsync( + */ + public Call getObjectAsync( String indexName, String objectID, List attributesToRetrieve, final ApiCallback> _callback ) throws ApiException { - okhttp3.Call localVarCall = getObjectValidateBeforeCall( + Call call = getObjectValidateBeforeCall( indexName, objectID, attributesToRetrieve, _callback ); - Type localVarReturnType = new TypeToken>() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken>() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -3564,53 +2475,27 @@ public okhttp3.Call getObjectAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getObjectsCall( + */ + private Call getObjectsCall( GetObjectsObject getObjectsObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = getObjectsObject; + Object body = getObjectsObject; // create path and map variables - String localVarPath = "/1/indexes/*/objects"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + String path = "/1/indexes/*/objects"; - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getObjectsValidateBeforeCall( + private Call getObjectsValidateBeforeCall( GetObjectsObject getObjectsObject, final ApiCallback _callback ) throws ApiException { @@ -3632,25 +2517,12 @@ private okhttp3.Call getObjectsValidateBeforeCall( * @return GetObjectsResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public GetObjectsResponse getObjects(GetObjectsObject getObjectsObject) throws ApiException { - okhttp3.Call localVarCall = getObjectsValidateBeforeCall( - getObjectsObject, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = getObjectsValidateBeforeCall(getObjectsObject, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -3662,27 +2534,15 @@ public GetObjectsResponse getObjects(GetObjectsObject getObjectsObject) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getObjectsAsync( + */ + public Call getObjectsAsync( GetObjectsObject getObjectsObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getObjectsValidateBeforeCall( - getObjectsObject, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getObjectsValidateBeforeCall(getObjectsObject, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -3693,25 +2553,16 @@ public okhttp3.Call getObjectsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getRuleCall( + */ + private Call getRuleCall( String indexName, String objectID, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/rules/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -3721,35 +2572,17 @@ public okhttp3.Call getRuleCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRuleValidateBeforeCall( + private Call getRuleValidateBeforeCall( String indexName, String objectID, final ApiCallback _callback @@ -3779,24 +2612,11 @@ private okhttp3.Call getRuleValidateBeforeCall( * @return Rule * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public Rule getRule(String indexName, String objectID) throws ApiException { - okhttp3.Call localVarCall = getRuleValidateBeforeCall( - indexName, - objectID, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = this.execute(localVarCall, localVarReturnType); + Call call = getRuleValidateBeforeCall(indexName, objectID, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -3808,29 +2628,16 @@ public Rule getRule(String indexName, String objectID) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getRuleAsync( + */ + public Call getRuleAsync( String indexName, String objectID, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getRuleValidateBeforeCall( - indexName, - objectID, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getRuleValidateBeforeCall(indexName, objectID, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -3840,58 +2647,29 @@ public okhttp3.Call getRuleAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getSettingsCall( - String indexName, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = null; + */ + private Call getSettingsCall(String indexName, final ApiCallback _callback) + throws ApiException { + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/settings".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); - } + return this.buildCall(path, "GET", queryParams, body, headers, _callback); + } @SuppressWarnings("rawtypes") - private okhttp3.Call getSettingsValidateBeforeCall( + private Call getSettingsValidateBeforeCall( String indexName, final ApiCallback _callback ) throws ApiException { @@ -3912,21 +2690,11 @@ private okhttp3.Call getSettingsValidateBeforeCall( * @return IndexSettings * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public IndexSettings getSettings(String indexName) throws ApiException { - okhttp3.Call localVarCall = getSettingsValidateBeforeCall(indexName, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = getSettingsValidateBeforeCall(indexName, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -3937,27 +2705,15 @@ public IndexSettings getSettings(String indexName) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getSettingsAsync( + */ + public Call getSettingsAsync( String indexName, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getSettingsValidateBeforeCall( - indexName, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getSettingsValidateBeforeCall(indexName, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -3966,50 +2722,25 @@ public okhttp3.Call getSettingsAsync( * @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 getSourcesCall(final ApiCallback _callback) - throws ApiException { - Object localVarPostBody = null; + private Call getSourcesCall(final ApiCallback _callback) throws ApiException { + Object body = null; // create path and map variables - String localVarPath = "/1/security/sources"; + String path = "/1/security/sources"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSourcesValidateBeforeCall( - final ApiCallback _callback - ) throws ApiException { + private Call getSourcesValidateBeforeCall(final ApiCallback _callback) + throws ApiException { return getSourcesCall(_callback); } @@ -4019,17 +2750,11 @@ private okhttp3.Call getSourcesValidateBeforeCall( * @return List<Source> * @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 getSources() throws ApiException { - okhttp3.Call localVarCall = getSourcesValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>() {}.getType(); - ApiResponse> res = - this.execute(localVarCall, localVarReturnType); + Call call = getSourcesValidateBeforeCall(null); + Type returnType = new TypeToken>() {}.getType(); + ApiResponse> res = this.execute(call, returnType); return res.getData(); } @@ -4039,19 +2764,13 @@ public List getSources() throws ApiException { * @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 getSourcesAsync( - final ApiCallback> _callback - ) throws ApiException { - okhttp3.Call localVarCall = getSourcesValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + public Call getSourcesAsync(final ApiCallback> _callback) + throws ApiException { + Call call = getSourcesValidateBeforeCall(_callback); + Type returnType = new TypeToken>() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4062,25 +2781,16 @@ public okhttp3.Call getSourcesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getSynonymCall( + */ + private Call getSynonymCall( String indexName, String objectID, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/synonyms/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -4090,35 +2800,17 @@ public okhttp3.Call getSynonymCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSynonymValidateBeforeCall( + private Call getSynonymValidateBeforeCall( String indexName, String objectID, final ApiCallback _callback @@ -4148,26 +2840,12 @@ private okhttp3.Call getSynonymValidateBeforeCall( * @return SynonymHit * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SynonymHit getSynonym(String indexName, String objectID) throws ApiException { - okhttp3.Call localVarCall = getSynonymValidateBeforeCall( - indexName, - objectID, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = getSynonymValidateBeforeCall(indexName, objectID, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -4179,29 +2857,16 @@ public SynonymHit getSynonym(String indexName, String objectID) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getSynonymAsync( + */ + public Call getSynonymAsync( String indexName, String objectID, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getSynonymValidateBeforeCall( - indexName, - objectID, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getSynonymValidateBeforeCall(indexName, objectID, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4212,25 +2877,16 @@ public okhttp3.Call getSynonymAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getTaskCall( + */ + private Call getTaskCall( String indexName, Integer taskID, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/task/{taskID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -4240,35 +2896,17 @@ public okhttp3.Call getTaskCall( this.escapeString(taskID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getTaskValidateBeforeCall( + private Call getTaskValidateBeforeCall( String indexName, Integer taskID, final ApiCallback _callback @@ -4298,26 +2936,12 @@ private okhttp3.Call getTaskValidateBeforeCall( * @return GetTaskResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public GetTaskResponse getTask(String indexName, Integer taskID) throws ApiException { - okhttp3.Call localVarCall = getTaskValidateBeforeCall( - indexName, - taskID, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = getTaskValidateBeforeCall(indexName, taskID, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -4329,29 +2953,16 @@ public GetTaskResponse getTask(String indexName, Integer taskID) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getTaskAsync( + */ + public Call getTaskAsync( String indexName, Integer taskID, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getTaskValidateBeforeCall( - indexName, - taskID, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getTaskValidateBeforeCall(indexName, taskID, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4360,54 +2971,26 @@ public okhttp3.Call getTaskAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getTopUserIdsCall(final ApiCallback _callback) + */ + private Call getTopUserIdsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/clusters/mapping/top"; + String path = "/1/clusters/mapping/top"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getTopUserIdsValidateBeforeCall( - final ApiCallback _callback - ) throws ApiException { + private Call getTopUserIdsValidateBeforeCall(final ApiCallback _callback) + throws ApiException { return getTopUserIdsCall(_callback); } @@ -4420,22 +3003,11 @@ private okhttp3.Call getTopUserIdsValidateBeforeCall( * @return GetTopUserIdsResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public GetTopUserIdsResponse getTopUserIds() throws ApiException { - okhttp3.Call localVarCall = getTopUserIdsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = getTopUserIdsValidateBeforeCall(null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -4448,24 +3020,14 @@ public GetTopUserIdsResponse getTopUserIds() throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getTopUserIdsAsync( + */ + public Call getTopUserIdsAsync( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getTopUserIdsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getTopUserIdsValidateBeforeCall(_callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4475,56 +3037,29 @@ public okhttp3.Call getTopUserIdsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getUserIdCall(Object userID, final ApiCallback _callback) + */ + private Call getUserIdCall(Object userID, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/clusters/mapping/{userID}".replaceAll( "\\{" + "userID" + "\\}", this.escapeString(userID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserIdValidateBeforeCall( + private Call getUserIdValidateBeforeCall( Object userID, final ApiCallback _callback ) throws ApiException { @@ -4548,20 +3083,11 @@ private okhttp3.Call getUserIdValidateBeforeCall( * @return UserId * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UserId getUserId(Object userID) throws ApiException { - okhttp3.Call localVarCall = getUserIdValidateBeforeCall(userID, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = this.execute(localVarCall, localVarReturnType); + Call call = getUserIdValidateBeforeCall(userID, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -4575,24 +3101,15 @@ public UserId getUserId(Object userID) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call getUserIdAsync( + */ + public Call getUserIdAsync( Object userID, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = getUserIdValidateBeforeCall(userID, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = getUserIdValidateBeforeCall(userID, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4602,60 +3119,31 @@ public okhttp3.Call getUserIdAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call hasPendingMappingsCall( + */ + private Call hasPendingMappingsCall( Boolean getClusters, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/clusters/mapping/pending"; + String path = "/1/clusters/mapping/pending"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (getClusters != null) { - localVarQueryParams.addAll( - this.parameterToPair("getClusters", getClusters) - ); - } - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); + queryParams.addAll(this.parameterToPair("getClusters", getClusters)); } - final String[] localVarContentTypes = {}; + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call hasPendingMappingsValidateBeforeCall( + private Call hasPendingMappingsValidateBeforeCall( Boolean getClusters, final ApiCallback _callback ) throws ApiException { @@ -4673,32 +3161,19 @@ private okhttp3.Call hasPendingMappingsValidateBeforeCall( * @return CreatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public CreatedAtResponse hasPendingMappings(Boolean getClusters) throws ApiException { - okhttp3.Call localVarCall = hasPendingMappingsValidateBeforeCall( - getClusters, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = hasPendingMappingsValidateBeforeCall(getClusters, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } /** - * Has pending mappings (asynchronously) Get the status of your clusters' migrations or user + * Has pending mappings (asynchronously) Get the status of your clusters' migrations or user * creations. Creating a large batch of users or migrating your multi-cluster may take quite some - * time. This method lets you retrieve the status of the migration, so you can know when it's + * time. This method lets you retrieve the status of the migration, so you can know when it's * done. Upon success, the response is 200 OK. A successful response indicates that the operation * has been taken into account, and the userIDs are directly usable. * @@ -4706,27 +3181,15 @@ public CreatedAtResponse hasPendingMappings(Boolean getClusters) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call hasPendingMappingsAsync( + */ + public Call hasPendingMappingsAsync( Boolean getClusters, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = hasPendingMappingsValidateBeforeCall( - getClusters, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = hasPendingMappingsValidateBeforeCall(getClusters, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4735,54 +3198,26 @@ public okhttp3.Call hasPendingMappingsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listApiKeysCall(final ApiCallback _callback) + */ + private Call listApiKeysCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/keys"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + String path = "/1/keys"; - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listApiKeysValidateBeforeCall( - final ApiCallback _callback - ) throws ApiException { + private Call listApiKeysValidateBeforeCall(final ApiCallback _callback) + throws ApiException { return listApiKeysCall(_callback); } @@ -4792,21 +3227,11 @@ private okhttp3.Call listApiKeysValidateBeforeCall( * @return ListApiKeysResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public ListApiKeysResponse listApiKeys() throws ApiException { - okhttp3.Call localVarCall = listApiKeysValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = listApiKeysValidateBeforeCall(null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -4817,23 +3242,14 @@ public ListApiKeysResponse listApiKeys() throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listApiKeysAsync( + */ + public Call listApiKeysAsync( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listApiKeysValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = listApiKeysValidateBeforeCall(_callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4842,54 +3258,26 @@ public okhttp3.Call listApiKeysAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listClustersCall(final ApiCallback _callback) + */ + private Call listClustersCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/clusters"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + String path = "/1/clusters"; - final String[] localVarContentTypes = {}; + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listClustersValidateBeforeCall( - final ApiCallback _callback - ) throws ApiException { + private Call listClustersValidateBeforeCall(final ApiCallback _callback) + throws ApiException { return listClustersCall(_callback); } @@ -4900,22 +3288,11 @@ private okhttp3.Call listClustersValidateBeforeCall( * @return ListClustersResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public ListClustersResponse listClusters() throws ApiException { - okhttp3.Call localVarCall = listClustersValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = listClustersValidateBeforeCall(null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -4926,24 +3303,14 @@ public ListClustersResponse listClusters() throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listClustersAsync( + */ + public Call listClustersAsync( final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listClustersValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = listClustersValidateBeforeCall(_callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -4955,58 +3322,29 @@ public okhttp3.Call listClustersAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listIndicesCall( - Integer page, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = null; + */ + private Call listIndicesCall(Integer page, final ApiCallback _callback) + throws ApiException { + Object body = null; // create path and map variables - String localVarPath = "/1/indexes"; + String path = "/1/indexes"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (page != null) { - localVarQueryParams.addAll(this.parameterToPair("Page", page)); + queryParams.addAll(this.parameterToPair("Page", page)); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listIndicesValidateBeforeCall( + private Call listIndicesValidateBeforeCall( Integer page, final ApiCallback _callback ) throws ApiException { @@ -5022,21 +3360,11 @@ private okhttp3.Call listIndicesValidateBeforeCall( * @return ListIndicesResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public ListIndicesResponse listIndices(Integer page) throws ApiException { - okhttp3.Call localVarCall = listIndicesValidateBeforeCall(page, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = listIndicesValidateBeforeCall(page, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -5049,24 +3377,15 @@ public ListIndicesResponse listIndices(Integer page) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listIndicesAsync( + */ + public Call listIndicesAsync( Integer page, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listIndicesValidateBeforeCall(page, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = listIndicesValidateBeforeCall(page, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -5079,65 +3398,36 @@ public okhttp3.Call listIndicesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listUserIdsCall( + */ + private Call listUserIdsCall( Integer page, Integer hitsPerPage, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = "/1/clusters/mapping"; + String path = "/1/clusters/mapping"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (page != null) { - localVarQueryParams.addAll(this.parameterToPair("Page", page)); + queryParams.addAll(this.parameterToPair("Page", page)); } if (hitsPerPage != null) { - localVarQueryParams.addAll( - this.parameterToPair("hitsPerPage", hitsPerPage) - ); - } - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); + queryParams.addAll(this.parameterToPair("hitsPerPage", hitsPerPage)); } - final String[] localVarContentTypes = {}; + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "GET", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listUserIdsValidateBeforeCall( + private Call listUserIdsValidateBeforeCall( Integer page, Integer hitsPerPage, final ApiCallback _callback @@ -5158,26 +3448,12 @@ private okhttp3.Call listUserIdsValidateBeforeCall( * @return ListUserIdsResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage) throws ApiException { - okhttp3.Call localVarCall = listUserIdsValidateBeforeCall( - page, - hitsPerPage, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = listUserIdsValidateBeforeCall(page, hitsPerPage, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -5194,29 +3470,16 @@ public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call listUserIdsAsync( + */ + public Call listUserIdsAsync( Integer page, Integer hitsPerPage, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = listUserIdsValidateBeforeCall( - page, - hitsPerPage, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = listUserIdsValidateBeforeCall(page, hitsPerPage, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -5226,53 +3489,27 @@ public okhttp3.Call listUserIdsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call multipleBatchCall( + */ + private Call multipleBatchCall( BatchObject batchObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = batchObject; + Object body = batchObject; // create path and map variables - String localVarPath = "/1/indexes/*/batch"; + String path = "/1/indexes/*/batch"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call multipleBatchValidateBeforeCall( + private Call multipleBatchValidateBeforeCall( BatchObject batchObject, final ApiCallback _callback ) throws ApiException { @@ -5294,26 +3531,12 @@ private okhttp3.Call multipleBatchValidateBeforeCall( * @return MultipleBatchResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public MultipleBatchResponse multipleBatch(BatchObject batchObject) throws ApiException { - okhttp3.Call localVarCall = multipleBatchValidateBeforeCall( - batchObject, - null - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = multipleBatchValidateBeforeCall(batchObject, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -5325,28 +3548,15 @@ public MultipleBatchResponse multipleBatch(BatchObject batchObject) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call multipleBatchAsync( + */ + public Call multipleBatchAsync( BatchObject batchObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = multipleBatchValidateBeforeCall( - batchObject, - _callback - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = multipleBatchValidateBeforeCall(batchObject, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -5356,53 +3566,27 @@ public okhttp3.Call multipleBatchAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call multipleQueriesCall( + */ + private Call multipleQueriesCall( MultipleQueriesObject multipleQueriesObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = multipleQueriesObject; + Object body = multipleQueriesObject; // create path and map variables - String localVarPath = "/1/indexes/*/queries"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + String path = "/1/indexes/*/queries"; - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call multipleQueriesValidateBeforeCall( + private Call multipleQueriesValidateBeforeCall( MultipleQueriesObject multipleQueriesObject, final ApiCallback _callback ) throws ApiException { @@ -5424,27 +3608,13 @@ private okhttp3.Call multipleQueriesValidateBeforeCall( * @return MultipleQueriesResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public MultipleQueriesResponse multipleQueries( MultipleQueriesObject multipleQueriesObject ) throws ApiException { - okhttp3.Call localVarCall = multipleQueriesValidateBeforeCall( - multipleQueriesObject, - null - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = multipleQueriesValidateBeforeCall(multipleQueriesObject, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -5455,28 +3625,18 @@ public MultipleQueriesResponse multipleQueries( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call multipleQueriesAsync( + */ + public Call multipleQueriesAsync( MultipleQueriesObject multipleQueriesObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = multipleQueriesValidateBeforeCall( + Call call = multipleQueriesValidateBeforeCall( multipleQueriesObject, _callback ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -5487,58 +3647,32 @@ public okhttp3.Call multipleQueriesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call operationIndexCall( + */ + private Call operationIndexCall( String indexName, OperationIndexObject operationIndexObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = operationIndexObject; + Object body = operationIndexObject; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/operation".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call operationIndexValidateBeforeCall( + private Call operationIndexValidateBeforeCall( String indexName, OperationIndexObject operationIndexObject, final ApiCallback _callback @@ -5569,28 +3703,18 @@ private okhttp3.Call operationIndexValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse operationIndex( String indexName, OperationIndexObject operationIndexObject ) throws ApiException { - okhttp3.Call localVarCall = operationIndexValidateBeforeCall( + Call call = operationIndexValidateBeforeCall( indexName, operationIndexObject, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -5602,29 +3726,20 @@ public UpdatedAtResponse operationIndex( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call operationIndexAsync( + */ + public Call operationIndexAsync( String indexName, OperationIndexObject operationIndexObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = operationIndexValidateBeforeCall( + Call call = operationIndexValidateBeforeCall( indexName, operationIndexObject, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -5638,27 +3753,18 @@ public okhttp3.Call operationIndexAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call partialUpdateObjectCall( + */ + private Call partialUpdateObjectCall( String indexName, String objectID, List> buildInOperation, Boolean createIfNotExists, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = buildInOperation; + Object body = buildInOperation; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/{objectID}/partial".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -5668,40 +3774,23 @@ public okhttp3.Call partialUpdateObjectCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (createIfNotExists != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("createIfNotExists", createIfNotExists) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call partialUpdateObjectValidateBeforeCall( + private Call partialUpdateObjectValidateBeforeCall( String indexName, String objectID, List> buildInOperation, @@ -5753,15 +3842,6 @@ private okhttp3.Call partialUpdateObjectValidateBeforeCall( * @return UpdatedAtWithObjectIdResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtWithObjectIdResponse partialUpdateObject( String indexName, @@ -5769,17 +3849,17 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( List> buildInOperation, Boolean createIfNotExists ) throws ApiException { - okhttp3.Call localVarCall = partialUpdateObjectValidateBeforeCall( + Call call = partialUpdateObjectValidateBeforeCall( indexName, objectID, buildInOperation, createIfNotExists, null ); - Type localVarReturnType = new TypeToken() {} + Type returnType = new TypeToken() {} .getType(); ApiResponse res = - this.execute(localVarCall, localVarReturnType); + this.execute(call, returnType); return res.getData(); } @@ -5787,8 +3867,8 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( * Partially update an object. (asynchronously) Update one or more attributes of an existing * object. This method lets you update only a part of an existing object, either by adding new * attributes or updating existing ones. You can partially update several objects in a single - * method call. If the index targeted by this operation doesn't exist yet, it's automatically - * created. + * method call. If the index targeted by this operation doesn't exist yet, it's + * automatically created. * * @param indexName The index in which to perform the request. (required) * @param objectID Unique identifier of an object. (required) @@ -5798,34 +3878,25 @@ public UpdatedAtWithObjectIdResponse partialUpdateObject( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call partialUpdateObjectAsync( + */ + public Call partialUpdateObjectAsync( String indexName, String objectID, List> buildInOperation, Boolean createIfNotExists, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = partialUpdateObjectValidateBeforeCall( + Call call = partialUpdateObjectValidateBeforeCall( indexName, objectID, buildInOperation, createIfNotExists, _callback ); - Type localVarReturnType = new TypeToken() {} + Type returnType = new TypeToken() {} .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -5835,58 +3906,36 @@ public okhttp3.Call partialUpdateObjectAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call removeUserIdCall( - Object userID, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = null; + */ + private Call removeUserIdCall(Object userID, final ApiCallback _callback) + throws ApiException { + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/clusters/mapping/{userID}".replaceAll( "\\{" + "userID" + "\\}", this.escapeString(userID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); return this.buildCall( - localVarPath, + path, "DELETE", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, + queryParams, + body, + headers, _callback ); } @SuppressWarnings("rawtypes") - private okhttp3.Call removeUserIdValidateBeforeCall( + private Call removeUserIdValidateBeforeCall( Object userID, final ApiCallback _callback ) throws ApiException { @@ -5908,22 +3957,11 @@ private okhttp3.Call removeUserIdValidateBeforeCall( * @return RemoveUserIdResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public RemoveUserIdResponse removeUserId(Object userID) throws ApiException { - okhttp3.Call localVarCall = removeUserIdValidateBeforeCall(userID, null); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = removeUserIdValidateBeforeCall(userID, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -5936,28 +3974,15 @@ public RemoveUserIdResponse removeUserId(Object userID) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call removeUserIdAsync( + */ + public Call removeUserIdAsync( Object userID, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = removeUserIdValidateBeforeCall( - userID, - _callback - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = removeUserIdValidateBeforeCall(userID, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -5967,49 +3992,27 @@ public okhttp3.Call removeUserIdAsync( * @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 replaceSourcesCall( + private Call replaceSourcesCall( List source, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = source; + Object body = source; // create path and map variables - String localVarPath = "/1/security/sources"; + String path = "/1/security/sources"; - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "PUT", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call replaceSourcesValidateBeforeCall( + private Call replaceSourcesValidateBeforeCall( List source, final ApiCallback _callback ) throws ApiException { @@ -6030,19 +4033,12 @@ private okhttp3.Call replaceSourcesValidateBeforeCall( * @return ReplaceSourceResponse * @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 ReplaceSourceResponse replaceSources(List source) throws ApiException { - okhttp3.Call localVarCall = replaceSourcesValidateBeforeCall(source, null); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = replaceSourcesValidateBeforeCall(source, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -6053,24 +4049,15 @@ public ReplaceSourceResponse replaceSources(List source) * @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 replaceSourcesAsync( + public Call replaceSourcesAsync( List source, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = replaceSourcesValidateBeforeCall( - source, - _callback - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = replaceSourcesValidateBeforeCall(source, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -6080,58 +4067,29 @@ public okhttp3.Call replaceSourcesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call restoreApiKeyCall( - String key, - final ApiCallback _callback - ) throws ApiException { - Object localVarPostBody = null; + */ + private Call restoreApiKeyCall(String key, final ApiCallback _callback) + throws ApiException { + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/keys/{key}/restore".replaceAll( "\\{" + "key" + "\\}", this.escapeString(key.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = {}; + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call restoreApiKeyValidateBeforeCall( + private Call restoreApiKeyValidateBeforeCall( String key, final ApiCallback _callback ) throws ApiException { @@ -6152,21 +4110,11 @@ private okhttp3.Call restoreApiKeyValidateBeforeCall( * @return AddApiKeyResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public AddApiKeyResponse restoreApiKey(String key) throws ApiException { - okhttp3.Call localVarCall = restoreApiKeyValidateBeforeCall(key, null); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = restoreApiKeyValidateBeforeCall(key, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -6178,24 +4126,15 @@ public AddApiKeyResponse restoreApiKey(String key) throws ApiException { * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call restoreApiKeyAsync( + */ + public Call restoreApiKeyAsync( String key, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = restoreApiKeyValidateBeforeCall(key, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = restoreApiKeyValidateBeforeCall(key, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -6206,58 +4145,32 @@ public okhttp3.Call restoreApiKeyAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveObjectCall( + */ + private Call saveObjectCall( String indexName, Map requestBody, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = requestBody; + Object body = requestBody; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call saveObjectValidateBeforeCall( + private Call saveObjectValidateBeforeCall( String indexName, Map requestBody, final ApiCallback _callback @@ -6287,28 +4200,14 @@ private okhttp3.Call saveObjectValidateBeforeCall( * @return SaveObjectResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SaveObjectResponse saveObject( String indexName, Map requestBody ) throws ApiException { - okhttp3.Call localVarCall = saveObjectValidateBeforeCall( - indexName, - requestBody, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = saveObjectValidateBeforeCall(indexName, requestBody, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -6320,29 +4219,16 @@ public SaveObjectResponse saveObject( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveObjectAsync( + */ + public Call saveObjectAsync( String indexName, Map requestBody, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = saveObjectValidateBeforeCall( - indexName, - requestBody, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = saveObjectValidateBeforeCall(indexName, requestBody, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -6356,27 +4242,18 @@ public okhttp3.Call saveObjectAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveRuleCall( + */ + private Call saveRuleCall( String indexName, String objectID, Rule rule, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = rule; + Object body = rule; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/rules/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -6386,40 +4263,23 @@ public okhttp3.Call saveRuleCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "PUT", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call saveRuleValidateBeforeCall( + private Call saveRuleValidateBeforeCall( String indexName, String objectID, Rule rule, @@ -6467,15 +4327,6 @@ private okhttp3.Call saveRuleValidateBeforeCall( * @return UpdatedRuleResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedRuleResponse saveRule( String indexName, @@ -6483,16 +4334,15 @@ public UpdatedRuleResponse saveRule( Rule rule, Boolean forwardToReplicas ) throws ApiException { - okhttp3.Call localVarCall = saveRuleValidateBeforeCall( + Call call = saveRuleValidateBeforeCall( indexName, objectID, rule, forwardToReplicas, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -6507,33 +4357,24 @@ public UpdatedRuleResponse saveRule( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveRuleAsync( + */ + public Call saveRuleAsync( String indexName, String objectID, Rule rule, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = saveRuleValidateBeforeCall( + Call call = saveRuleValidateBeforeCall( indexName, objectID, rule, forwardToReplicas, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -6547,27 +4388,18 @@ public okhttp3.Call saveRuleAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveSynonymCall( + */ + private Call saveSynonymCall( String indexName, String objectID, SynonymHit synonymHit, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = synonymHit; + Object body = synonymHit; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/synonyms/{objectID}".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -6577,40 +4409,23 @@ public okhttp3.Call saveSynonymCall( this.escapeString(objectID.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "PUT", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call saveSynonymValidateBeforeCall( + private Call saveSynonymValidateBeforeCall( String indexName, String objectID, SynonymHit synonymHit, @@ -6659,15 +4474,6 @@ private okhttp3.Call saveSynonymValidateBeforeCall( * @return SaveSynonymResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SaveSynonymResponse saveSynonym( String indexName, @@ -6675,16 +4481,15 @@ public SaveSynonymResponse saveSynonym( SynonymHit synonymHit, Boolean forwardToReplicas ) throws ApiException { - okhttp3.Call localVarCall = saveSynonymValidateBeforeCall( + Call call = saveSynonymValidateBeforeCall( indexName, objectID, synonymHit, forwardToReplicas, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -6700,33 +4505,24 @@ public SaveSynonymResponse saveSynonym( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveSynonymAsync( + */ + public Call saveSynonymAsync( String indexName, String objectID, SynonymHit synonymHit, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = saveSynonymValidateBeforeCall( + Call call = saveSynonymValidateBeforeCall( indexName, objectID, synonymHit, forwardToReplicas, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -6741,72 +4537,46 @@ public okhttp3.Call saveSynonymAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveSynonymsCall( + */ + private Call saveSynonymsCall( String indexName, List synonymHit, Boolean forwardToReplicas, Boolean replaceExistingSynonyms, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = synonymHit; + Object body = synonymHit; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/synonyms/batch".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } if (replaceExistingSynonyms != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("replaceExistingSynonyms", replaceExistingSynonyms) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call saveSynonymsValidateBeforeCall( + private Call saveSynonymsValidateBeforeCall( String indexName, List synonymHit, Boolean forwardToReplicas, @@ -6849,15 +4619,6 @@ private okhttp3.Call saveSynonymsValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse saveSynonyms( String indexName, @@ -6865,16 +4626,15 @@ public UpdatedAtResponse saveSynonyms( Boolean forwardToReplicas, Boolean replaceExistingSynonyms ) throws ApiException { - okhttp3.Call localVarCall = saveSynonymsValidateBeforeCall( + Call call = saveSynonymsValidateBeforeCall( indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -6891,33 +4651,24 @@ public UpdatedAtResponse saveSynonyms( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call saveSynonymsAsync( + */ + public Call saveSynonymsAsync( String indexName, List synonymHit, Boolean forwardToReplicas, Boolean replaceExistingSynonyms, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = saveSynonymsValidateBeforeCall( + Call call = saveSynonymsValidateBeforeCall( indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -6928,58 +4679,32 @@ public okhttp3.Call saveSynonymsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchCall( + */ + private Call searchCall( String indexName, SearchParams searchParams, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = searchParams; + Object body = searchParams; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/query".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchValidateBeforeCall( + private Call searchValidateBeforeCall( String indexName, SearchParams searchParams, final ApiCallback _callback @@ -7009,26 +4734,12 @@ private okhttp3.Call searchValidateBeforeCall( * @return SearchResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SearchResponse search(String indexName, SearchParams searchParams) throws ApiException { - okhttp3.Call localVarCall = searchValidateBeforeCall( - indexName, - searchParams, - null - ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = searchValidateBeforeCall(indexName, searchParams, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -7040,29 +4751,16 @@ public SearchResponse search(String indexName, SearchParams searchParams) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchAsync( + */ + public Call searchAsync( String indexName, SearchParams searchParams, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = searchValidateBeforeCall( - indexName, - searchParams, - _callback - ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = searchValidateBeforeCall(indexName, searchParams, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -7073,58 +4771,32 @@ public okhttp3.Call searchAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchDictionaryEntriesCall( + */ + private Call searchDictionaryEntriesCall( String dictionaryName, SearchDictionaryEntries searchDictionaryEntries, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = searchDictionaryEntries; + Object body = searchDictionaryEntries; // create path and map variables - String localVarPath = + String path = "/1/dictionaries/{dictionaryName}/search".replaceAll( "\\{" + "dictionaryName" + "\\}", this.escapeString(dictionaryName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchDictionaryEntriesValidateBeforeCall( + private Call searchDictionaryEntriesValidateBeforeCall( String dictionaryName, SearchDictionaryEntries searchDictionaryEntries, final ApiCallback _callback @@ -7160,28 +4832,18 @@ private okhttp3.Call searchDictionaryEntriesValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse searchDictionaryEntries( String dictionaryName, SearchDictionaryEntries searchDictionaryEntries ) throws ApiException { - okhttp3.Call localVarCall = searchDictionaryEntriesValidateBeforeCall( + Call call = searchDictionaryEntriesValidateBeforeCall( dictionaryName, searchDictionaryEntries, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -7193,29 +4855,20 @@ public UpdatedAtResponse searchDictionaryEntries( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchDictionaryEntriesAsync( + */ + public Call searchDictionaryEntriesAsync( String dictionaryName, SearchDictionaryEntries searchDictionaryEntries, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = searchDictionaryEntriesValidateBeforeCall( + Call call = searchDictionaryEntriesValidateBeforeCall( dictionaryName, searchDictionaryEntries, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -7227,26 +4880,17 @@ public okhttp3.Call searchDictionaryEntriesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchForFacetValuesCall( + */ + private Call searchForFacetValuesCall( String indexName, String facetName, SearchForFacetValuesRequest searchForFacetValuesRequest, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = searchForFacetValuesRequest; + Object body = searchForFacetValuesRequest; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/facets/{facetName}/query".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) @@ -7256,34 +4900,17 @@ public okhttp3.Call searchForFacetValuesCall( this.escapeString(facetName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchForFacetValuesValidateBeforeCall( + private Call searchForFacetValuesValidateBeforeCall( String indexName, String facetName, SearchForFacetValuesRequest searchForFacetValuesRequest, @@ -7321,31 +4948,22 @@ private okhttp3.Call searchForFacetValuesValidateBeforeCall( * @return SearchForFacetValuesResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SearchForFacetValuesResponse searchForFacetValues( String indexName, String facetName, SearchForFacetValuesRequest searchForFacetValuesRequest ) throws ApiException { - okhttp3.Call localVarCall = searchForFacetValuesValidateBeforeCall( + Call call = searchForFacetValuesValidateBeforeCall( indexName, facetName, searchForFacetValuesRequest, null ); - Type localVarReturnType = new TypeToken() {} + Type returnType = new TypeToken() {} .getType(); ApiResponse res = - this.execute(localVarCall, localVarReturnType); + this.execute(call, returnType); return res.getData(); } @@ -7360,32 +4978,23 @@ public SearchForFacetValuesResponse searchForFacetValues( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchForFacetValuesAsync( + */ + public Call searchForFacetValuesAsync( String indexName, String facetName, SearchForFacetValuesRequest searchForFacetValuesRequest, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = searchForFacetValuesValidateBeforeCall( + Call call = searchForFacetValuesValidateBeforeCall( indexName, facetName, searchForFacetValuesRequest, _callback ); - Type localVarReturnType = new TypeToken() {} + Type returnType = new TypeToken() {} .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -7396,58 +5005,32 @@ public okhttp3.Call searchForFacetValuesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchRulesCall( + */ + private Call searchRulesCall( String indexName, SearchRulesParams searchRulesParams, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = searchRulesParams; + Object body = searchRulesParams; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/rules/search".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchRulesValidateBeforeCall( + private Call searchRulesValidateBeforeCall( String indexName, SearchRulesParams searchRulesParams, final ApiCallback _callback @@ -7477,28 +5060,18 @@ private okhttp3.Call searchRulesValidateBeforeCall( * @return SearchRulesResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SearchRulesResponse searchRules( String indexName, SearchRulesParams searchRulesParams ) throws ApiException { - okhttp3.Call localVarCall = searchRulesValidateBeforeCall( + Call call = searchRulesValidateBeforeCall( indexName, searchRulesParams, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -7510,29 +5083,20 @@ public SearchRulesResponse searchRules( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchRulesAsync( + */ + public Call searchRulesAsync( String indexName, SearchRulesParams searchRulesParams, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = searchRulesValidateBeforeCall( + Call call = searchRulesValidateBeforeCall( indexName, searchRulesParams, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -7548,17 +5112,8 @@ public okhttp3.Call searchRulesAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchSynonymsCall( + */ + private Call searchSynonymsCall( String indexName, String query, String type, @@ -7566,62 +5121,42 @@ public okhttp3.Call searchSynonymsCall( Integer hitsPerPage, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = null; + Object body = null; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/synonyms/search".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (query != null) { - localVarQueryParams.addAll(this.parameterToPair("query", query)); + queryParams.addAll(this.parameterToPair("query", query)); } if (type != null) { - localVarQueryParams.addAll(this.parameterToPair("type", type)); + queryParams.addAll(this.parameterToPair("type", type)); } if (page != null) { - localVarQueryParams.addAll(this.parameterToPair("Page", page)); + queryParams.addAll(this.parameterToPair("Page", page)); } if (hitsPerPage != null) { - localVarQueryParams.addAll( - this.parameterToPair("hitsPerPage", hitsPerPage) - ); + queryParams.addAll(this.parameterToPair("hitsPerPage", hitsPerPage)); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchSynonymsValidateBeforeCall( + private Call searchSynonymsValidateBeforeCall( String indexName, String query, String type, @@ -7660,15 +5195,6 @@ private okhttp3.Call searchSynonymsValidateBeforeCall( * @return SearchSynonymsResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SearchSynonymsResponse searchSynonyms( String indexName, @@ -7677,7 +5203,7 @@ public SearchSynonymsResponse searchSynonyms( Integer page, Integer hitsPerPage ) throws ApiException { - okhttp3.Call localVarCall = searchSynonymsValidateBeforeCall( + Call call = searchSynonymsValidateBeforeCall( indexName, query, type, @@ -7685,10 +5211,8 @@ public SearchSynonymsResponse searchSynonyms( hitsPerPage, null ); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -7706,17 +5230,8 @@ public SearchSynonymsResponse searchSynonyms( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchSynonymsAsync( + */ + public Call searchSynonymsAsync( String indexName, String query, String type, @@ -7724,7 +5239,7 @@ public okhttp3.Call searchSynonymsAsync( Integer hitsPerPage, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = searchSynonymsValidateBeforeCall( + Call call = searchSynonymsValidateBeforeCall( indexName, query, type, @@ -7732,10 +5247,9 @@ public okhttp3.Call searchSynonymsAsync( hitsPerPage, _callback ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -7745,53 +5259,27 @@ public okhttp3.Call searchSynonymsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchUserIdsCall( + */ + private Call searchUserIdsCall( SearchUserIdsObject searchUserIdsObject, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = searchUserIdsObject; + Object body = searchUserIdsObject; // create path and map variables - String localVarPath = "/1/clusters/mapping/search"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + String path = "/1/clusters/mapping/search"; - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "POST", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchUserIdsValidateBeforeCall( + private Call searchUserIdsValidateBeforeCall( SearchUserIdsObject searchUserIdsObject, final ApiCallback _callback ) throws ApiException { @@ -7818,34 +5306,20 @@ private okhttp3.Call searchUserIdsValidateBeforeCall( * @return SearchUserIdsResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public SearchUserIdsResponse searchUserIds( SearchUserIdsObject searchUserIdsObject ) throws ApiException { - okhttp3.Call localVarCall = searchUserIdsValidateBeforeCall( - searchUserIdsObject, - null - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = searchUserIdsValidateBeforeCall(searchUserIdsObject, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } /** * Search userID (asynchronously) Search for userIDs. The data returned will usually be a few * seconds behind real time, because userID usage may take up to a few seconds propagate to the - * different clusters. To keep updates moving quickly, the index of userIDs isn't built + * different clusters. To keep updates moving quickly, the index of userIDs isn't built * synchronously with the mapping. Instead, the index is built once every 12h, at the same time as * the update of userID usage. For example, when you perform a modification like adding or moving * a userID, the search will report an outdated value until the next rebuild of the mapping, which @@ -7856,28 +5330,15 @@ public SearchUserIdsResponse searchUserIds( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call searchUserIdsAsync( + */ + public Call searchUserIdsAsync( SearchUserIdsObject searchUserIdsObject, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = searchUserIdsValidateBeforeCall( - searchUserIdsObject, - _callback - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = searchUserIdsValidateBeforeCall(searchUserIdsObject, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -7887,53 +5348,27 @@ public okhttp3.Call searchUserIdsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call setDictionarySettingsCall( + */ + private Call setDictionarySettingsCall( DictionarySettingsRequest dictionarySettingsRequest, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = dictionarySettingsRequest; + Object body = dictionarySettingsRequest; // create path and map variables - String localVarPath = "/1/dictionaries/*/settings"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + String path = "/1/dictionaries/*/settings"; - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "PUT", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call setDictionarySettingsValidateBeforeCall( + private Call setDictionarySettingsValidateBeforeCall( DictionarySettingsRequest dictionarySettingsRequest, final ApiCallback _callback ) throws ApiException { @@ -7955,26 +5390,16 @@ private okhttp3.Call setDictionarySettingsValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse setDictionarySettings( DictionarySettingsRequest dictionarySettingsRequest ) throws ApiException { - okhttp3.Call localVarCall = setDictionarySettingsValidateBeforeCall( + Call call = setDictionarySettingsValidateBeforeCall( dictionarySettingsRequest, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -7985,27 +5410,18 @@ public UpdatedAtResponse setDictionarySettings( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call setDictionarySettingsAsync( + */ + public Call setDictionarySettingsAsync( DictionarySettingsRequest dictionarySettingsRequest, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = setDictionarySettingsValidateBeforeCall( + Call call = setDictionarySettingsValidateBeforeCall( dictionarySettingsRequest, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -8018,65 +5434,39 @@ public okhttp3.Call setDictionarySettingsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call setSettingsCall( + */ + private Call setSettingsCall( String indexName, IndexSettings indexSettings, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = indexSettings; + Object body = indexSettings; // create path and map variables - String localVarPath = + String path = "/1/indexes/{indexName}/settings".replaceAll( "\\{" + "indexName" + "\\}", this.escapeString(indexName.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + List queryParams = new ArrayList(); + Map headers = new HashMap(); if (forwardToReplicas != null) { - localVarQueryParams.addAll( + queryParams.addAll( this.parameterToPair("forwardToReplicas", forwardToReplicas) ); } - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "PUT", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call setSettingsValidateBeforeCall( + private Call setSettingsValidateBeforeCall( String indexName, IndexSettings indexSettings, Boolean forwardToReplicas, @@ -8115,30 +5505,20 @@ private okhttp3.Call setSettingsValidateBeforeCall( * @return UpdatedAtResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdatedAtResponse setSettings( String indexName, IndexSettings indexSettings, Boolean forwardToReplicas ) throws ApiException { - okhttp3.Call localVarCall = setSettingsValidateBeforeCall( + Call call = setSettingsValidateBeforeCall( indexName, indexSettings, forwardToReplicas, null ); - Type localVarReturnType = new TypeToken() {}.getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -8154,31 +5534,22 @@ public UpdatedAtResponse setSettings( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call setSettingsAsync( + */ + public Call setSettingsAsync( String indexName, IndexSettings indexSettings, Boolean forwardToReplicas, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = setSettingsValidateBeforeCall( + Call call = setSettingsValidateBeforeCall( indexName, indexSettings, forwardToReplicas, _callback ); - Type localVarReturnType = new TypeToken() {}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } /** @@ -8189,58 +5560,32 @@ public okhttp3.Call setSettingsAsync( * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call updateApiKeyCall( + */ + private Call updateApiKeyCall( String key, ApiKey apiKey, final ApiCallback _callback ) throws ApiException { - Object localVarPostBody = apiKey; + Object body = apiKey; // create path and map variables - String localVarPath = + String path = "/1/keys/{key}".replaceAll( "\\{" + "key" + "\\}", this.escapeString(key.toString()) ); - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } + List queryParams = new ArrayList(); + Map headers = new HashMap(); - final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = - this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall( - localVarPath, - "PUT", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - _callback - ); + return this.buildCall(path, "PUT", queryParams, body, headers, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateApiKeyValidateBeforeCall( + private Call updateApiKeyValidateBeforeCall( String key, ApiKey apiKey, final ApiCallback _callback @@ -8270,27 +5615,12 @@ private okhttp3.Call updateApiKeyValidateBeforeCall( * @return UpdateApiKeyResponse * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
*/ public UpdateApiKeyResponse updateApiKey(String key, ApiKey apiKey) throws ApiException { - okhttp3.Call localVarCall = updateApiKeyValidateBeforeCall( - key, - apiKey, - null - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - ApiResponse res = - this.execute(localVarCall, localVarReturnType); + Call call = updateApiKeyValidateBeforeCall(key, apiKey, null); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -8302,29 +5632,15 @@ public UpdateApiKeyResponse updateApiKey(String key, ApiKey apiKey) * @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 -
400 Bad request or request arguments. -
402 This feature is not enabled on your Algolia account. -
403 Method not allowed with this API key. -
404 Index not found. -
- */ - public okhttp3.Call updateApiKeyAsync( + */ + public Call updateApiKeyAsync( String key, ApiKey apiKey, final ApiCallback _callback ) throws ApiException { - okhttp3.Call localVarCall = updateApiKeyValidateBeforeCall( - key, - apiKey, - _callback - ); - Type localVarReturnType = new TypeToken() {} - .getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; + Call call = updateApiKeyValidateBeforeCall(key, apiKey, _callback); + Type returnType = new TypeToken() {}.getType(); + this.executeAsync(call, returnType, _callback); + return call; } } diff --git a/templates/java/CustomInstantDeserializer.mustache b/templates/java/CustomInstantDeserializer.mustache deleted file mode 100644 index 5ebea810e1d..00000000000 --- a/templates/java/CustomInstantDeserializer.mustache +++ /dev/null @@ -1,232 +0,0 @@ -package {{invokerPackage}}; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonTokenId; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; -import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; -import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; -import com.fasterxml.jackson.datatype.threetenbp.function.Function; -import org.threeten.bp.DateTimeException; -import org.threeten.bp.DateTimeUtils; -import org.threeten.bp.Instant; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.ZoneId; -import org.threeten.bp.ZonedDateTime; -import org.threeten.bp.format.DateTimeFormatter; -import org.threeten.bp.temporal.Temporal; -import org.threeten.bp.temporal.TemporalAccessor; - -import java.io.IOException; -import java.math.BigDecimal; - -/** - * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s. - * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format. - * - * @author Nick Williams - */ -public class CustomInstantDeserializer - extends ThreeTenDateTimeDeserializerBase { - private static final long serialVersionUID = 1L; - - public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer( - Instant.class, DateTimeFormatter.ISO_INSTANT, - new Function() { - @Override - public Instant apply(TemporalAccessor temporalAccessor) { - return Instant.from(temporalAccessor); - } - }, - new Function() { - @Override - public Instant apply(FromIntegerArguments a) { - return Instant.ofEpochMilli(a.value); - } - }, - new Function() { - @Override - public Instant apply(FromDecimalArguments a) { - return Instant.ofEpochSecond(a.integer, a.fraction); - } - }, - null - ); - - public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer( - OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, - new Function() { - @Override - public OffsetDateTime apply(TemporalAccessor temporalAccessor) { - return OffsetDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromIntegerArguments a) { - return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromDecimalArguments a) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { - return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); - } - } - ); - - public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer( - ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, - new Function() { - @Override - public ZonedDateTime apply(TemporalAccessor temporalAccessor) { - return ZonedDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromIntegerArguments a) { - return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromDecimalArguments a) { - return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { - return zonedDateTime.withZoneSameInstant(zoneId); - } - } - ); - - protected final Function fromMilliseconds; - - protected final Function fromNanoseconds; - - protected final Function parsedToValue; - - protected final BiFunction adjust; - - protected CustomInstantDeserializer(Class supportedType, - DateTimeFormatter parser, - Function parsedToValue, - Function fromMilliseconds, - Function fromNanoseconds, - BiFunction adjust) { - super(supportedType, parser); - this.parsedToValue = parsedToValue; - this.fromMilliseconds = fromMilliseconds; - this.fromNanoseconds = fromNanoseconds; - this.adjust = adjust == null ? new BiFunction() { - @Override - public T apply(T t, ZoneId zoneId) { - return t; - } - } : adjust; - } - - @SuppressWarnings("unchecked") - protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) { - super((Class) base.handledType(), f); - parsedToValue = base.parsedToValue; - fromMilliseconds = base.fromMilliseconds; - fromNanoseconds = base.fromNanoseconds; - adjust = base.adjust; - } - - @Override - protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) { - if (dtf == _formatter) { - return this; - } - return new CustomInstantDeserializer(this, dtf); - } - - @Override - public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { - //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only - //string values have to be adjusted to the configured TZ. - switch (parser.getCurrentTokenId()) { - case JsonTokenId.ID_NUMBER_FLOAT: { - BigDecimal value = parser.getDecimalValue(); - long seconds = value.longValue(); - int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); - return fromNanoseconds.apply(new FromDecimalArguments( - seconds, nanoseconds, getZone(context))); - } - - case JsonTokenId.ID_NUMBER_INT: { - long timestamp = parser.getLongValue(); - if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) { - return this.fromNanoseconds.apply(new FromDecimalArguments( - timestamp, 0, this.getZone(context) - )); - } - return this.fromMilliseconds.apply(new FromIntegerArguments( - timestamp, this.getZone(context) - )); - } - - case JsonTokenId.ID_STRING: { - String string = parser.getText().trim(); - if (string.length() == 0) { - return null; - } - if (string.endsWith("+0000")) { - string = string.substring(0, string.length() - 5) + "Z"; - } - T value; - try { - TemporalAccessor acc = _formatter.parse(string); - value = parsedToValue.apply(acc); - if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { - return adjust.apply(value, this.getZone(context)); - } - } catch (DateTimeException e) { - throw _peelDTE(e); - } - return value; - } - } - throw context.mappingException("Expected type float, integer, or string."); - } - - private ZoneId getZone(DeserializationContext context) { - // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); - } - - private static class FromIntegerArguments { - public final long value; - public final ZoneId zoneId; - - private FromIntegerArguments(long value, ZoneId zoneId) { - this.value = value; - this.zoneId = zoneId; - } - } - - private static class FromDecimalArguments { - public final long integer; - public final int fraction; - public final ZoneId zoneId; - - private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) { - this.integer = integer; - this.fraction = fraction; - this.zoneId = zoneId; - } - } -} diff --git a/templates/java/JSON.mustache b/templates/java/JSON.mustache index cd412a98539..5d0d5bcee36 100644 --- a/templates/java/JSON.mustache +++ b/templates/java/JSON.mustache @@ -7,25 +7,9 @@ import com.google.gson.TypeAdapter; import com.google.gson.internal.bind.util.ISO8601Utils; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonElement; import io.gsonfire.GsonFireBuilder; import io.gsonfire.TypeSelector; -{{#joda}} -import org.joda.time.DateTime; -import org.joda.time.LocalDate; -import org.joda.time.format.DateTimeFormatter; -import org.joda.time.format.DateTimeFormatterBuilder; -import org.joda.time.format.ISODateTimeFormat; -{{/joda}} -{{#threetenbp}} -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; -{{/threetenbp}} - -{{#models.0}} -import {{modelPackage}}.*; -{{/models.0}} + import okio.ByteString; import java.io.IOException; @@ -41,7 +25,6 @@ import java.time.format.DateTimeFormatter; {{/java8}} import java.util.Date; import java.util.Locale; -import java.util.Map; import java.util.HashMap; public class JSON { @@ -59,7 +42,6 @@ public class JSON { {{/jsr310}} private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - @SuppressWarnings("unchecked") public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() {{#models}} @@ -88,29 +70,6 @@ public class JSON { return builder; } - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue{{^discriminatorCaseSensitive}}.toUpperCase(Locale.ROOT){{/discriminatorCaseSensitive}}); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - public JSON() { gson = createGson() .registerTypeAdapter(Date.class, dateTypeAdapter) @@ -170,7 +129,6 @@ public class JSON { * @param returnType The type to deserialize into * @return The deserialized Java object */ - @SuppressWarnings("unchecked") public T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { diff --git a/templates/java/libraries/okhttp-gson/ApiClient.mustache b/templates/java/libraries/okhttp-gson/ApiClient.mustache index d2f144bee02..e729d7161ec 100644 --- a/templates/java/libraries/okhttp-gson/ApiClient.mustache +++ b/templates/java/libraries/okhttp-gson/ApiClient.mustache @@ -2,41 +2,22 @@ package {{invokerPackage}}; import okhttp3.*; import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.BufferedSink; -import okio.Okio; -import javax.net.ssl.*; -import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.lang.reflect.Type; -import java.net.URI; import java.net.URLConnection; import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; import java.text.DateFormat; {{#java8}} import java.time.LocalDate; import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; {{/java8}} import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; public class ApiClient { @@ -49,10 +30,6 @@ public class ApiClient { private DateFormat dateFormat; - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; - private OkHttpClient httpClient; private JSON json; @@ -62,7 +39,8 @@ public class ApiClient { * Basic constructor for ApiClient */ public ApiClient(String appId, String apiKey) { - init(); + json = new JSON(); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); initHttpClient(); this.basePath = "https://" + appId + "-1.algolianet.com"; @@ -84,15 +62,6 @@ public class ApiClient { httpClient = builder.build(); } - private void init() { - verifyingSsl = true; - - json = new JSON(); - - // Set default User-Agent. - setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); - } - /** * Get JSON * @@ -113,68 +82,6 @@ public class ApiClient { return this; } - /** - * True if isVerifyingSsl flag is on - * - * @return True if isVerifySsl flag is on - */ - public boolean isVerifyingSsl() { - return verifyingSsl; - } - - /** - * Configure whether to verify certificate and hostname when making https requests. - * Default to true. - * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. - * - * @param verifyingSsl True to verify TLS/SSL connection - * @return ApiClient - */ - public ApiClient setVerifyingSsl(boolean verifyingSsl) { - this.verifyingSsl = verifyingSsl; - applySslSettings(); - return this; - } - - /** - * Get SSL CA cert. - * - * @return Input stream to the SSL CA cert - */ - public InputStream getSslCaCert() { - return sslCaCert; - } - - /** - * Configure the CA certificate to be trusted when making https requests. - * Use null to reset to default. - * - * @param sslCaCert input stream for SSL CA cert - * @return ApiClient - */ - public ApiClient setSslCaCert(InputStream sslCaCert) { - this.sslCaCert = sslCaCert; - applySslSettings(); - return this; - } - - public KeyManager[] getKeyManagers() { - return keyManagers; - } - - /** - * Configure client keys to use for authorization in an SSL session. - * Use null to reset to default. - * - * @param managers The KeyManagers to use - * @return ApiClient - */ - public ApiClient setKeyManagers(KeyManager[] managers) { - this.keyManagers = managers; - applySslSettings(); - return this; - } - public DateFormat getDateFormat() { return dateFormat; } @@ -184,11 +91,6 @@ public class ApiClient { return this; } - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - this.json.setSqlDateFormat(dateFormat); - return this; - } - public ApiClient setLenientOnJson(boolean lenientOnJson) { this.json.setLenientOnJson(lenientOnJson); return this; @@ -447,17 +349,6 @@ public class ApiClient { return sb.substring(delimiter.length()); } - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param filename The filename to be sanitized - * @return The sanitized filename - */ - public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); - } - /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: @@ -474,52 +365,6 @@ public class ApiClient { return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); } - /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - StringJoiner joiner = new StringJoiner(","); - for(String s : accepts) { - joiner.add(s); - } - return joiner.toString(); - } - - /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * or matches "any", JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { - return "application/json"; - } - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - return contentTypes[0]; - } - /** * Escape the given string to be used as URL query value. * @@ -545,7 +390,6 @@ public class ApiClient { * @throws ApiException If fail to deserialize response body, i.e. cannot read response body * or the Content-Type of the response is not supported. */ - @SuppressWarnings("unchecked") public T deserialize(Response response, Type returnType) throws ApiException { if (response == null || returnType == null) { return null; @@ -606,9 +450,6 @@ public class ApiClient { if (obj instanceof byte[]) { // Binary (byte array) body parameter support. return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); - } else if (obj instanceof File) { - // File body parameter support. - return RequestBody.create((File) obj, MediaType.parse(contentType)); } else if (isJsonMime(contentType)) { String content; if (obj != null) { @@ -692,7 +533,6 @@ public class ApiClient { * @param callback ApiCallback * @see #execute(Call, Type) */ - @SuppressWarnings("unchecked") public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { call.enqueue(new Callback() { @Override @@ -762,15 +602,14 @@ public class ApiClient { * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters * @param callback Callback for upload/download progress * @return The HTTP call * @throws ApiException If fail to serialize the request body object */ - public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, ApiCallback callback) throws ApiException { - Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, callback); + public Call buildCall(String path, String method, List queryParams, Object body, Map headerParams, ApiCallback callback) throws ApiException { + Request request = buildRequest(path, method, queryParams, body, headerParams, callback); return httpClient.newCall(request); } @@ -781,18 +620,17 @@ public class ApiClient { * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters * @param callback Callback for upload/download progress * @return The HTTP request * @throws ApiException If fail to serialize the request body object */ - public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, ApiCallback callback) throws ApiException { + public Request buildRequest(String path, String method, List queryParams, Object body, Map headerParams, ApiCallback callback) throws ApiException { headerParams.put("X-Algolia-Application-Id", this.appId); headerParams.put("X-Algolia-API-Key", this.apiKey); - final String url = buildUrl(path, queryParams, collectionQueryParams); + final String url = buildUrl(path, queryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); @@ -838,10 +676,9 @@ public class ApiClient { * * @param path The sub path * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters * @return The full URL */ - public String buildUrl(String path, List queryParams, List collectionQueryParams) { + public String buildUrl(String path, List queryParams) { final StringBuilder url = new StringBuilder(); url.append(basePath).append(path); @@ -862,23 +699,6 @@ public class ApiClient { } } - if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { - String prefix = url.toString().contains("?") ? "&" : "?"; - for (Pair param : collectionQueryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - // collection query parameter value already escaped as part of parameterToPairs - url.append(escapeString(param.getName())).append("=").append(value); - } - } - } - return url.toString(); } @@ -913,44 +733,6 @@ public class ApiClient { return formBuilder.build(); } - /** - * Build a multipart (file uploading) request body with the given form parameters, - * which could contain text fields and file fields. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyMultipart(Map formParams) { - MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } else { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); - mpBuilder.addPart(partHeaders, RequestBody.create(parameterToString(param.getValue()), null)); - } - } - return mpBuilder.build(); - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - public String guessContentTypeFromFile(File file) { - String contentType = URLConnection.guessContentTypeFromName(file.getName()); - if (contentType == null) { - return "application/octet-stream"; - } else { - return contentType; - } - } - /** * Get network interceptor to add it to the httpClient to track download progress for * async requests. @@ -971,80 +753,4 @@ public class ApiClient { } }; } - - /** - * Apply SSL related settings to httpClient according to the current values of - * verifyingSsl and sslCaCert. - */ - private void applySslSettings() { - try { - TrustManager[] trustManagers; - HostnameVerifier hostnameVerifier; - if (!verifyingSsl) { - trustManagers = new TrustManager[]{ - new X509TrustManager() { - @Override - public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[]{}; - } - } - }; - hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - } else { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - - if (sslCaCert == null) { - trustManagerFactory.init((KeyStore) null); - } else { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - trustManagerFactory.init(caKeyStore); - } - trustManagers = trustManagerFactory.getTrustManagers(); - hostnameVerifier = OkHostnameVerifier.INSTANCE; - } - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder() - .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) - .hostnameVerifier(hostnameVerifier) - .build(); - } catch (GeneralSecurityException e) { - throw new RuntimeException(e); - } - } - - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { - try { - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, password); - return keyStore; - } catch (IOException e) { - throw new AssertionError(e); - } - } } diff --git a/templates/java/libraries/okhttp-gson/api.mustache b/templates/java/libraries/okhttp-gson/api.mustache index c1ae6f9e6cc..983a88cd076 100644 --- a/templates/java/libraries/okhttp-gson/api.mustache +++ b/templates/java/libraries/okhttp-gson/api.mustache @@ -5,28 +5,10 @@ import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiResponse; import {{invokerPackage}}.Pair; -import {{invokerPackage}}.ProgressRequestBody; -import {{invokerPackage}}.ProgressResponseBody; -{{#performBeanValidation}} -import {{invokerPackage}}.BeanValidationException; -{{/performBeanValidation}} import com.google.gson.reflect.TypeToken; -import java.io.IOException; - -{{#useBeanValidation}} -import javax.validation.constraints.*; -{{/useBeanValidation}} -{{#performBeanValidation}} -import javax.validation.ConstraintViolation; -import javax.validation.Validation; -import javax.validation.ValidatorFactory; -import javax.validation.executable.ExecutableValidator; -import java.util.Set; -import java.lang.reflect.Method; -import java.lang.reflect.Type; -{{/performBeanValidation}} +import okhttp3.Call; {{#imports}}import {{import}}; {{/imports}} @@ -46,21 +28,12 @@ public class {{classname}} extends ApiClient { } {{#operation}} - {{^vendorExtensions.x-group-parameters}}/** + /** * Build call for {{operationId}}{{#allParams}} * @param {{paramName}} {{&description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -72,51 +45,39 @@ public class {{classname}} extends ApiClient { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { - Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + private Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { + Object body = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; // create path and map variables - String localVarPath = "{{{path}}}"{{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", this.escapeString({{#collectionFormat}}this.collectionPathParameterToString("{{{collectionFormat}}}", {{{paramName}}}){{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}.toString(){{/collectionFormat}})){{/pathParams}}; + String path = "{{{path}}}"{{#pathParams}} + .replaceAll("\\{" + "{{baseName}}" + "\\}", this.escapeString({{{paramName}}}.toString())){{/pathParams}}; - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}List queryParams = new {{javaUtilPrefix}}ArrayList(); + {{javaUtilPrefix}}Map headers = new {{javaUtilPrefix}}HashMap(); {{#queryParams}} if ({{paramName}} != null) { - {{#collectionFormat}}localVarCollectionQueryParams.addAll(this.parameterToPairs("{{{.}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(this.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + queryParams.addAll(this.parameterToPair("{{baseName}}", {{paramName}})); } {{/queryParams}} {{#headerParams}} if ({{paramName}} != null) { - localVarHeaderParams.put("{{baseName}}", this.parameterToString({{paramName}})); - } - - {{/headerParams}} - final String[] localVarAccepts = { - {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} - }; - final String localVarAccept = this.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); + headers.put("{{baseName}}", this.parameterToString({{paramName}})); } - final String[] localVarContentTypes = { - {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} - }; - final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + {{/headerParams}} + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); - return this.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, _callback); + return this.buildCall(path, "{{httpMethod}}", queryParams, body, headers, _callback); } {{#isDeprecated}} @Deprecated {{/isDeprecated}} @SuppressWarnings("rawtypes") - private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { + private Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { @@ -127,22 +88,12 @@ public class {{classname}} extends ApiClient { return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); } - {{^vendorExtensions.x-group-parameters}} /** * {{&summary}} * {{¬es}}{{#allParams}} * @param {{paramName}} {{&description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#returnType}} * @return {{.}}{{/returnType}} * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -155,189 +106,18 @@ public class {{classname}} extends ApiClient { @Deprecated {{/isDeprecated}} public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { - okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); - {{#returnType}}Type localVarReturnType = new TypeToken<{{{.}}}>(){}.getType(); - ApiResponse<{{{.}}}> res = this.execute(localVarCall, localVarReturnType); - return res.getData();{{/returnType}}{{^returnType}}return this.execute(localVarCall).getData();{{/returnType}} + Call call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); + {{#returnType}}Type returnType = new TypeToken<{{{.}}}>(){}.getType(); + ApiResponse<{{{.}}}> res = this.execute(call, returnType); + return res.getData();{{/returnType}}{{^returnType}}return this.execute(call).getData();{{/returnType}} } - {{/vendorExtensions.x-group-parameters}} - - {{^vendorExtensions.x-group-parameters}}/** - * {{&summary}} (asynchronously) - * {{¬es}}{{#allParams}} - * @param {{paramName}} {{&description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} + /** + * {{summary}} (asynchronously) + * {{notes}}{{#allParams}} + * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} * @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 - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - {{#externalDocs}} - * {{&description}} - * @see {{&summary}} Documentation - {{/externalDocs}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { - - okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_callback); - {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); - this.executeAsync(localVarCall, localVarReturnType, _callback);{{/returnType}}{{^returnType}}this.executeAsync(localVarCall, _callback);{{/returnType}} - return localVarCall; - } - {{#vendorExtensions.x-group-parameters}} - - public class API{{operationId}}Request { - {{#requiredParams}} - private final {{{dataType}}} {{paramName}}; - {{/requiredParams}} - {{#optionalParams}} - private {{{dataType}}} {{paramName}}; - {{/optionalParams}} - - private API{{operationId}}Request({{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}) { - {{#requiredParams}} - this.{{paramName}} = {{paramName}}; - {{/requiredParams}} - } - - {{#optionalParams}} - /** - * Set {{paramName}} - * @param {{paramName}} {{&description}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}) - * @return API{{operationId}}Request - */ - public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) { - this.{{paramName}} = {{paramName}}; - return this; - } - - {{/optionalParams}} - /** - * Build call for {{operationId}} - * @param _callback ApiCallback API callback - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); - } - - /** - * Execute {{operationId}} request{{#returnType}} - * @return {{.}}{{/returnType}} - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} execute() throws ApiException { - {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - return localVarResp.getData();{{/returnType}} - } - - /** - * Execute {{operationId}} request with HTTP info returned - * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - public ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { - return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - } - - /** - * Execute {{operationId}} request (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 - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - public okhttp3.Call executeAsync(final ApiCallback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { - return {{operationId}}Async({{#allParams}}{{paramName}}, {{/allParams}}_callback); - } - } - - /** - * {{&summary}} - * {{¬es}}{{#requiredParams}} - * @param {{paramName}} {{&description}} (required){{/requiredParams}} - * @return API{{operationId}}Request - {{#responses.0}} - * @http.response.details - - - {{#responses}} - - {{/responses}} -
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{&description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
- {{/responses.0}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -349,10 +129,12 @@ public class {{classname}} extends ApiClient { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public API{{operationId}}Request {{operationId}}({{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}) { - return new API{{operationId}}Request({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}); + public Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { + Call call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_callback); + {{#returnType}}Type returnType = new TypeToken<{{{returnType}}}>(){}.getType(); + this.executeAsync(call, returnType, _callback);{{/returnType}}{{^returnType}}this.executeAsync(call, _callback);{{/returnType}} + return call; } - {{/vendorExtensions.x-group-parameters}} {{/operation}} } {{/operations}} diff --git a/templates/java/model.mustache b/templates/java/model.mustache index d8db05d71b8..bb0704faa1f 100644 --- a/templates/java/model.mustache +++ b/templates/java/model.mustache @@ -38,13 +38,6 @@ import javax.json.bind.annotation.JsonbProperty; import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} -{{#useBeanValidation}} -import javax.validation.constraints.*; -import javax.validation.Valid; -{{/useBeanValidation}} -{{#performBeanValidation}} -import org.hibernate.validator.constraints.*; -{{/performBeanValidation}} {{#models}} {{#model}} diff --git a/templates/java/pojo.mustache b/templates/java/pojo.mustache index 6039e529f90..a0b6bf47e70 100644 --- a/templates/java/pojo.mustache +++ b/templates/java/pojo.mustache @@ -193,7 +193,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{&description}}") +@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{&description}}") {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} From a3fd78a9febe4770648675db2bd483bc12a21f59 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Thu, 16 Dec 2021 10:31:54 +0100 Subject: [PATCH 3/4] simplify models --- .../com/algolia/model/AddApiKeyResponse.java | 14 +- .../com/algolia/model/ApiKey.java | 69 +-- .../com/algolia/model/AssignUserIdObject.java | 12 +- .../algolia/model/AutomaticFacetFilter.java | 25 +- .../com/algolia/model/BaseBrowseResponse.java | 11 +- .../com/algolia/model/BaseIndexSettings.java | 90 +-- .../com/algolia/model/BaseSearchParams.java | 227 +------ .../com/algolia/model/BaseSearchResponse.java | 181 +----- .../model/BaseSearchResponseFacetsStats.java | 21 +- .../model/BatchAssignUserIdsObject.java | 20 +- .../algolia/model/BatchDictionaryEntries.java | 19 +- .../model/BatchDictionaryEntriesRequest.java | 11 +- .../com/algolia/model/BatchObject.java | 8 +- .../com/algolia/model/BatchResponse.java | 11 +- .../com/algolia/model/BatchWriteObject.java | 8 +- .../com/algolia/model/BrowseRequest.java | 15 +- .../com/algolia/model/BrowseResponse.java | 196 +----- .../com/algolia/model/BuildInOperation.java | 23 +- .../com/algolia/model/Condition.java | 23 +- .../com/algolia/model/Consequence.java | 38 +- .../com/algolia/model/ConsequenceHide.java | 8 +- .../com/algolia/model/CreatedAtObject.java | 9 +- .../com/algolia/model/CreatedAtResponse.java | 11 +- .../algolia/model/DeleteApiKeyResponse.java | 9 +- .../algolia/model/DeleteSourceResponse.java | 9 +- .../com/algolia/model/DeletedAtResponse.java | 19 +- .../com/algolia/model/DictionaryEntry.java | 38 +- .../com/algolia/model/DictionaryLanguage.java | 12 +- .../model/DictionarySettingsRequest.java | 11 +- .../com/algolia/model/ErrorBase.java | 8 +- .../model/GetDictionarySettingsResponse.java | 7 +- .../com/algolia/model/GetLogsResponse.java | 6 +- .../model/GetLogsResponseInnerQueries.java | 16 +- .../algolia/model/GetLogsResponseLogs.java | 97 +-- .../com/algolia/model/GetObjectsObject.java | 8 +- .../com/algolia/model/GetObjectsResponse.java | 6 +- .../com/algolia/model/GetTaskResponse.java | 6 +- .../algolia/model/GetTopUserIdsResponse.java | 11 +- .../com/algolia/model/HighlightResult.java | 33 +- .../com/algolia/model/Index.java | 84 +-- .../com/algolia/model/IndexSettings.java | 423 ++----------- .../model/IndexSettingsAsSearchParams.java | 332 ++--------- .../com/algolia/model/KeyObject.java | 75 +-- .../com/algolia/model/Languages.java | 18 +- .../algolia/model/ListApiKeysResponse.java | 6 +- .../algolia/model/ListClustersResponse.java | 11 +- .../algolia/model/ListIndicesResponse.java | 11 +- .../algolia/model/ListUserIdsResponse.java | 8 +- .../algolia/model/MultipleBatchResponse.java | 11 +- .../model/MultipleGetObjectsObject.java | 27 +- .../com/algolia/model/MultipleQueries.java | 33 +- .../algolia/model/MultipleQueriesObject.java | 11 +- .../model/MultipleQueriesResponse.java | 6 +- .../com/algolia/model/Operation.java | 18 +- .../algolia/model/OperationIndexObject.java | 26 +- .../com/algolia/model/Params.java | 27 +- .../com/algolia/model/Promote.java | 25 +- .../com/algolia/model/RankingInfo.java | 77 +-- .../model/RankingInfoMatchedGeoLocation.java | 18 +- .../com/algolia/model/Record.java | 30 +- .../algolia/model/RemoveUserIdResponse.java | 9 +- .../algolia/model/ReplaceSourceResponse.java | 9 +- .../com/algolia/model/Rule.java | 46 +- .../com/algolia/model/SaveObjectResponse.java | 16 +- .../algolia/model/SaveSynonymResponse.java | 22 +- .../model/SearchDictionaryEntries.java | 25 +- .../model/SearchForFacetValuesRequest.java | 19 +- .../model/SearchForFacetValuesResponse.java | 6 +- ...SearchForFacetValuesResponseFacetHits.java | 25 +- .../com/algolia/model/SearchHits.java | 6 +- .../com/algolia/model/SearchParams.java | 563 +++--------------- .../com/algolia/model/SearchParamsObject.java | 558 +++-------------- .../com/algolia/model/SearchParamsString.java | 6 +- .../com/algolia/model/SearchResponse.java | 186 +----- .../com/algolia/model/SearchRulesParams.java | 47 +- .../algolia/model/SearchRulesResponse.java | 21 +- .../algolia/model/SearchSynonymsResponse.java | 15 +- .../algolia/model/SearchUserIdsObject.java | 27 +- .../algolia/model/SearchUserIdsResponse.java | 41 +- .../SearchUserIdsResponseHighlightResult.java | 11 +- .../model/SearchUserIdsResponseHits.java | 47 +- .../com/algolia/model/SnippetResult.java | 16 +- .../com/algolia/model/Source.java | 17 +- .../com/algolia/model/StandardEntries.java | 21 +- .../com/algolia/model/SynonymHit.java | 56 +- .../model/SynonymHitHighlightResult.java | 13 +- .../com/algolia/model/TimeRange.java | 17 +- .../algolia/model/UpdateApiKeyResponse.java | 14 +- .../com/algolia/model/UpdatedAtResponse.java | 21 +- .../model/UpdatedAtWithObjectIdResponse.java | 20 +- .../algolia/model/UpdatedRuleResponse.java | 22 +- .../com/algolia/model/UserId.java | 39 +- clients/algoliasearch-client-java-2/pom.xml | 12 - .../java/libraries/okhttp-gson/pom.mustache | 12 - templates/java/model.mustache | 14 - templates/java/modelEnum.mustache | 12 +- templates/java/pojo.mustache | 44 +- 97 files changed, 629 insertions(+), 4049 deletions(-) diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AddApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AddApiKeyResponse.java index 0d7222491fb..f597283044b 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AddApiKeyResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AddApiKeyResponse.java @@ -1,21 +1,16 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** AddApiKeyResponse */ public class AddApiKeyResponse { - public static final String SERIALIZED_NAME_KEY = "key"; - - @SerializedName(SERIALIZED_NAME_KEY) + @SerializedName("key") private String key; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - - @SerializedName(SERIALIZED_NAME_CREATED_AT) + @SerializedName("createdAt") private OffsetDateTime createdAt; public AddApiKeyResponse key(String key) { @@ -29,7 +24,6 @@ public AddApiKeyResponse key(String key) { * @return key */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Key string.") public String getKey() { return key; } @@ -49,10 +43,6 @@ public AddApiKeyResponse createdAt(OffsetDateTime createdAt) { * @return createdAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of creation (ISO-8601 format)." - ) public OffsetDateTime getCreatedAt() { return createdAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ApiKey.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ApiKey.java index d6669327f12..313ed2554a3 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ApiKey.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ApiKey.java @@ -5,15 +5,12 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Api Key object. */ -@ApiModel(description = "Api Key object.") public class ApiKey { /** Gets or Sets acl */ @@ -87,47 +84,28 @@ public AclEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_ACL = "acl"; - - @SerializedName(SERIALIZED_NAME_ACL) + @SerializedName("acl") private List acl = new ArrayList<>(); - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @SerializedName("description") private String description = ""; - public static final String SERIALIZED_NAME_INDEXES = "indexes"; - - @SerializedName(SERIALIZED_NAME_INDEXES) + @SerializedName("indexes") private List indexes = null; - public static final String SERIALIZED_NAME_MAX_HITS_PER_QUERY = - "maxHitsPerQuery"; - - @SerializedName(SERIALIZED_NAME_MAX_HITS_PER_QUERY) + @SerializedName("maxHitsPerQuery") private Integer maxHitsPerQuery = 0; - public static final String SERIALIZED_NAME_MAX_QUERIES_PER_I_P_PER_HOUR = - "maxQueriesPerIPPerHour"; - - @SerializedName(SERIALIZED_NAME_MAX_QUERIES_PER_I_P_PER_HOUR) + @SerializedName("maxQueriesPerIPPerHour") private Integer maxQueriesPerIPPerHour = 0; - public static final String SERIALIZED_NAME_QUERY_PARAMETERS = - "queryParameters"; - - @SerializedName(SERIALIZED_NAME_QUERY_PARAMETERS) + @SerializedName("queryParameters") private String queryParameters = ""; - public static final String SERIALIZED_NAME_REFERERS = "referers"; - - @SerializedName(SERIALIZED_NAME_REFERERS) + @SerializedName("referers") private List referers = null; - public static final String SERIALIZED_NAME_VALIDITY = "validity"; - - @SerializedName(SERIALIZED_NAME_VALIDITY) + @SerializedName("validity") private Integer validity = 0; public ApiKey acl(List acl) { @@ -146,10 +124,6 @@ public ApiKey addAclItem(AclEnum aclItem) { * @return acl */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Set of permissions associated with the key." - ) public List getAcl() { return acl; } @@ -170,10 +144,6 @@ public ApiKey description(String description) { * @return description */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A comment used to identify a key more easily in the dashboard. It is not interpreted by" + - " the API." - ) public String getDescription() { return description; } @@ -202,10 +172,6 @@ public ApiKey addIndexesItem(String indexesItem) { * @return indexes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict this new API key to a list of indices or index patterns. If the list is empty," + - " all indices are allowed." - ) public List getIndexes() { return indexes; } @@ -225,10 +191,6 @@ public ApiKey maxHitsPerQuery(Integer maxHitsPerQuery) { * @return maxHitsPerQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of hits this API key can retrieve in one query. If zero, no limit is" + - " enforced." - ) public Integer getMaxHitsPerQuery() { return maxHitsPerQuery; } @@ -248,9 +210,6 @@ public ApiKey maxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { * @return maxQueriesPerIPPerHour */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of API calls per hour allowed from a given IP address or a user token." - ) public Integer getMaxQueriesPerIPPerHour() { return maxQueriesPerIPPerHour; } @@ -271,10 +230,6 @@ public ApiKey queryParameters(String queryParameters) { * @return queryParameters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "URL-encoded query string. Force some query parameters to be applied for each query made" + - " with this API key." - ) public String getQueryParameters() { return queryParameters; } @@ -302,10 +257,6 @@ public ApiKey addReferersItem(String referersItem) { * @return referers */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict this new API key to specific referers. If empty or blank, defaults to all" + - " referers." - ) public List getReferers() { return referers; } @@ -326,10 +277,6 @@ public ApiKey validity(Integer validity) { * @return validity */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Validity limit for this key in seconds. The key will automatically be removed after this" + - " period of time." - ) public Integer getValidity() { return validity; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdObject.java index 3e0fdc73325..0ea72ab932f 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdObject.java @@ -1,17 +1,12 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** Assign userID object. */ -@ApiModel(description = "Assign userID object.") public class AssignUserIdObject { - public static final String SERIALIZED_NAME_CLUSTER = "cluster"; - - @SerializedName(SERIALIZED_NAME_CLUSTER) + @SerializedName("cluster") private String cluster; public AssignUserIdObject cluster(String cluster) { @@ -25,11 +20,6 @@ public AssignUserIdObject cluster(String cluster) { * @return cluster */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "c11-test", - required = true, - value = "Name of the cluster." - ) public String getCluster() { return cluster; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AutomaticFacetFilter.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AutomaticFacetFilter.java index 1ea2fb012d8..0badc11f39d 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AutomaticFacetFilter.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AutomaticFacetFilter.java @@ -1,27 +1,18 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** Automatic facet Filter. */ -@ApiModel(description = "Automatic facet Filter.") public class AutomaticFacetFilter { - public static final String SERIALIZED_NAME_FACET = "facet"; - - @SerializedName(SERIALIZED_NAME_FACET) + @SerializedName("facet") private String facet; - public static final String SERIALIZED_NAME_SCORE = "score"; - - @SerializedName(SERIALIZED_NAME_SCORE) + @SerializedName("score") private Integer score = 1; - public static final String SERIALIZED_NAME_DISJUNCTIVE = "disjunctive"; - - @SerializedName(SERIALIZED_NAME_DISJUNCTIVE) + @SerializedName("disjunctive") private Boolean disjunctive = false; public AutomaticFacetFilter facet(String facet) { @@ -35,10 +26,6 @@ public AutomaticFacetFilter facet(String facet) { * @return facet */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Attribute to filter on. This must match a facet placeholder in the Rule's pattern." - ) public String getFacet() { return facet; } @@ -58,9 +45,6 @@ public AutomaticFacetFilter score(Integer score) { * @return score */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Score for the filter. Typically used for optional or disjunctive filters." - ) public Integer getScore() { return score; } @@ -80,9 +64,6 @@ public AutomaticFacetFilter disjunctive(Boolean disjunctive) { * @return disjunctive */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the filter is disjunctive (true) or conjunctive (false)." - ) public Boolean getDisjunctive() { return disjunctive; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseBrowseResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseBrowseResponse.java index 0bff9b68365..1657eccac53 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseBrowseResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseBrowseResponse.java @@ -1,15 +1,12 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** BaseBrowseResponse */ public class BaseBrowseResponse { - public static final String SERIALIZED_NAME_CURSOR = "cursor"; - - @SerializedName(SERIALIZED_NAME_CURSOR) + @SerializedName("cursor") private String cursor; public BaseBrowseResponse cursor(String cursor) { @@ -24,12 +21,6 @@ public BaseBrowseResponse cursor(String cursor) { * @return cursor */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "jMDY3M2MwM2QwMWUxMmQwYWI0ZTN", - required = true, - value = "Cursor indicating the location to resume browsing from. Must match the value returned by" + - " the previous call." - ) public String getCursor() { return cursor; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseIndexSettings.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseIndexSettings.java index 5ac1b4dfa23..499f1f948b5 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseIndexSettings.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseIndexSettings.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -11,72 +10,40 @@ /** BaseIndexSettings */ public class BaseIndexSettings { - public static final String SERIALIZED_NAME_REPLICAS = "replicas"; - - @SerializedName(SERIALIZED_NAME_REPLICAS) + @SerializedName("replicas") private List replicas = null; - public static final String SERIALIZED_NAME_PAGINATION_LIMITED_TO = - "paginationLimitedTo"; - - @SerializedName(SERIALIZED_NAME_PAGINATION_LIMITED_TO) + @SerializedName("paginationLimitedTo") private Integer paginationLimitedTo = 1000; - public static final String SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_WORDS = - "disableTypoToleranceOnWords"; - - @SerializedName(SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_WORDS) + @SerializedName("disableTypoToleranceOnWords") private List disableTypoToleranceOnWords = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_TRANSLITERATE = - "attributesToTransliterate"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_TRANSLITERATE) + @SerializedName("attributesToTransliterate") private List attributesToTransliterate = null; - public static final String SERIALIZED_NAME_CAMEL_CASE_ATTRIBUTES = - "camelCaseAttributes"; - - @SerializedName(SERIALIZED_NAME_CAMEL_CASE_ATTRIBUTES) + @SerializedName("camelCaseAttributes") private List camelCaseAttributes = null; - public static final String SERIALIZED_NAME_DECOMPOUNDED_ATTRIBUTES = - "decompoundedAttributes"; - - @SerializedName(SERIALIZED_NAME_DECOMPOUNDED_ATTRIBUTES) + @SerializedName("decompoundedAttributes") private Map decompoundedAttributes = null; - public static final String SERIALIZED_NAME_INDEX_LANGUAGES = "indexLanguages"; - - @SerializedName(SERIALIZED_NAME_INDEX_LANGUAGES) + @SerializedName("indexLanguages") private List indexLanguages = null; - public static final String SERIALIZED_NAME_FILTER_PROMOTES = "filterPromotes"; - - @SerializedName(SERIALIZED_NAME_FILTER_PROMOTES) + @SerializedName("filterPromotes") private Boolean filterPromotes = false; - public static final String SERIALIZED_NAME_DISABLE_PREFIX_ON_ATTRIBUTES = - "disablePrefixOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_PREFIX_ON_ATTRIBUTES) + @SerializedName("disablePrefixOnAttributes") private List disablePrefixOnAttributes = null; - public static final String SERIALIZED_NAME_ALLOW_COMPRESSION_OF_INTEGER_ARRAY = - "allowCompressionOfIntegerArray"; - - @SerializedName(SERIALIZED_NAME_ALLOW_COMPRESSION_OF_INTEGER_ARRAY) + @SerializedName("allowCompressionOfIntegerArray") private Boolean allowCompressionOfIntegerArray = false; - public static final String SERIALIZED_NAME_NUMERIC_ATTRIBUTES_FOR_FILTERING = - "numericAttributesForFiltering"; - - @SerializedName(SERIALIZED_NAME_NUMERIC_ATTRIBUTES_FOR_FILTERING) + @SerializedName("numericAttributesForFiltering") private List numericAttributesForFiltering = null; - public static final String SERIALIZED_NAME_USER_DATA = "userData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) + @SerializedName("userData") private Map userData = null; public BaseIndexSettings replicas(List replicas) { @@ -98,7 +65,6 @@ public BaseIndexSettings addReplicasItem(String replicasItem) { * @return replicas */ @javax.annotation.Nullable - @ApiModelProperty(value = "Creates replicas, exact copies of an index.") public List getReplicas() { return replicas; } @@ -118,9 +84,6 @@ public BaseIndexSettings paginationLimitedTo(Integer paginationLimitedTo) { * @return paginationLimitedTo */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Set the maximum number of hits accessible via pagination." - ) public Integer getPaginationLimitedTo() { return paginationLimitedTo; } @@ -152,9 +115,6 @@ public BaseIndexSettings addDisableTypoToleranceOnWordsItem( * @return disableTypoToleranceOnWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A list of words for which you want to turn off typo tolerance." - ) public List getDisableTypoToleranceOnWords() { return disableTypoToleranceOnWords; } @@ -188,9 +148,6 @@ public BaseIndexSettings addAttributesToTransliterateItem( * @return attributesToTransliterate */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Specify on which attributes to apply transliteration." - ) public List getAttributesToTransliterate() { return attributesToTransliterate; } @@ -224,9 +181,6 @@ public BaseIndexSettings addCamelCaseAttributesItem( * @return camelCaseAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which to do a decomposition of camel case words." - ) public List getCamelCaseAttributes() { return camelCaseAttributes; } @@ -260,10 +214,6 @@ public BaseIndexSettings putDecompoundedAttributesItem( * @return decompoundedAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Specify on which attributes in your index Algolia should apply word segmentation, also" + - " known as decompounding." - ) public Map getDecompoundedAttributes() { return decompoundedAttributes; } @@ -294,10 +244,6 @@ public BaseIndexSettings addIndexLanguagesItem(String indexLanguagesItem) { * @return indexLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Sets the languages at the index level for language-specific processing such as" + - " tokenization and normalization." - ) public List getIndexLanguages() { return indexLanguages; } @@ -318,10 +264,6 @@ public BaseIndexSettings filterPromotes(Boolean filterPromotes) { * @return filterPromotes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether promoted results should match the filters of the current search, except for" + - " geographic filters." - ) public Boolean getFilterPromotes() { return filterPromotes; } @@ -353,9 +295,6 @@ public BaseIndexSettings addDisablePrefixOnAttributesItem( * @return disablePrefixOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable prefix matching." - ) public List getDisablePrefixOnAttributes() { return disablePrefixOnAttributes; } @@ -379,7 +318,6 @@ public BaseIndexSettings allowCompressionOfIntegerArray( * @return allowCompressionOfIntegerArray */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables compression of large integer arrays.") public Boolean getAllowCompressionOfIntegerArray() { return allowCompressionOfIntegerArray; } @@ -413,9 +351,6 @@ public BaseIndexSettings addNumericAttributesForFilteringItem( * @return numericAttributesForFiltering */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of numeric attributes that can be used as numerical filters." - ) public List getNumericAttributesForFiltering() { return numericAttributesForFiltering; } @@ -445,7 +380,6 @@ public BaseIndexSettings putUserDataItem(String key, Object userDataItem) { * @return userData */ @javax.annotation.Nullable - @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { return userData; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java index 5f5537719ee..10ef20e16f9 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; @@ -12,183 +11,103 @@ /** BaseSearchParams */ public class BaseSearchParams { - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_SIMILAR_QUERY = "similarQuery"; - - @SerializedName(SERIALIZED_NAME_SIMILAR_QUERY) + @SerializedName("similarQuery") private String similarQuery = ""; - public static final String SERIALIZED_NAME_FILTERS = "filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) + @SerializedName("filters") private String filters = ""; - public static final String SERIALIZED_NAME_FACET_FILTERS = "facetFilters"; - - @SerializedName(SERIALIZED_NAME_FACET_FILTERS) + @SerializedName("facetFilters") private List facetFilters = null; - public static final String SERIALIZED_NAME_OPTIONAL_FILTERS = - "optionalFilters"; - - @SerializedName(SERIALIZED_NAME_OPTIONAL_FILTERS) + @SerializedName("optionalFilters") private List optionalFilters = null; - public static final String SERIALIZED_NAME_NUMERIC_FILTERS = "numericFilters"; - - @SerializedName(SERIALIZED_NAME_NUMERIC_FILTERS) + @SerializedName("numericFilters") private List numericFilters = null; - public static final String SERIALIZED_NAME_TAG_FILTERS = "tagFilters"; - - @SerializedName(SERIALIZED_NAME_TAG_FILTERS) + @SerializedName("tagFilters") private List tagFilters = null; - public static final String SERIALIZED_NAME_SUM_OR_FILTERS_SCORES = - "sumOrFiltersScores"; - - @SerializedName(SERIALIZED_NAME_SUM_OR_FILTERS_SCORES) + @SerializedName("sumOrFiltersScores") private Boolean sumOrFiltersScores = false; - public static final String SERIALIZED_NAME_FACETS = "facets"; - - @SerializedName(SERIALIZED_NAME_FACETS) + @SerializedName("facets") private List facets = null; - public static final String SERIALIZED_NAME_MAX_VALUES_PER_FACET = - "maxValuesPerFacet"; - - @SerializedName(SERIALIZED_NAME_MAX_VALUES_PER_FACET) + @SerializedName("maxValuesPerFacet") private Integer maxValuesPerFacet = 100; - public static final String SERIALIZED_NAME_FACETING_AFTER_DISTINCT = - "facetingAfterDistinct"; - - @SerializedName(SERIALIZED_NAME_FACETING_AFTER_DISTINCT) + @SerializedName("facetingAfterDistinct") private Boolean facetingAfterDistinct = false; - public static final String SERIALIZED_NAME_SORT_FACET_VALUES_BY = - "sortFacetValuesBy"; - - @SerializedName(SERIALIZED_NAME_SORT_FACET_VALUES_BY) + @SerializedName("sortFacetValuesBy") private String sortFacetValuesBy = "count"; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_OFFSET = "offset"; - - @SerializedName(SERIALIZED_NAME_OFFSET) + @SerializedName("offset") private Integer offset; - public static final String SERIALIZED_NAME_LENGTH = "length"; - - @SerializedName(SERIALIZED_NAME_LENGTH) + @SerializedName("length") private Integer length; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG = "aroundLatLng"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG) + @SerializedName("aroundLatLng") private String aroundLatLng = ""; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG_VIA_I_P = - "aroundLatLngViaIP"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG_VIA_I_P) + @SerializedName("aroundLatLngViaIP") private Boolean aroundLatLngViaIP = false; - public static final String SERIALIZED_NAME_AROUND_RADIUS = "aroundRadius"; - - @SerializedName(SERIALIZED_NAME_AROUND_RADIUS) + @SerializedName("aroundRadius") private OneOfintegerstring aroundRadius; - public static final String SERIALIZED_NAME_AROUND_PRECISION = - "aroundPrecision"; - - @SerializedName(SERIALIZED_NAME_AROUND_PRECISION) + @SerializedName("aroundPrecision") private Integer aroundPrecision = 10; - public static final String SERIALIZED_NAME_MINIMUM_AROUND_RADIUS = - "minimumAroundRadius"; - - @SerializedName(SERIALIZED_NAME_MINIMUM_AROUND_RADIUS) + @SerializedName("minimumAroundRadius") private Integer minimumAroundRadius; - public static final String SERIALIZED_NAME_INSIDE_BOUNDING_BOX = - "insideBoundingBox"; - - @SerializedName(SERIALIZED_NAME_INSIDE_BOUNDING_BOX) + @SerializedName("insideBoundingBox") private List insideBoundingBox = null; - public static final String SERIALIZED_NAME_INSIDE_POLYGON = "insidePolygon"; - - @SerializedName(SERIALIZED_NAME_INSIDE_POLYGON) + @SerializedName("insidePolygon") private List insidePolygon = null; - public static final String SERIALIZED_NAME_NATURAL_LANGUAGES = - "naturalLanguages"; - - @SerializedName(SERIALIZED_NAME_NATURAL_LANGUAGES) + @SerializedName("naturalLanguages") private List naturalLanguages = null; - public static final String SERIALIZED_NAME_RULE_CONTEXTS = "ruleContexts"; - - @SerializedName(SERIALIZED_NAME_RULE_CONTEXTS) + @SerializedName("ruleContexts") private List ruleContexts = null; - public static final String SERIALIZED_NAME_PERSONALIZATION_IMPACT = - "personalizationImpact"; - - @SerializedName(SERIALIZED_NAME_PERSONALIZATION_IMPACT) + @SerializedName("personalizationImpact") private Integer personalizationImpact = 100; - public static final String SERIALIZED_NAME_USER_TOKEN = "userToken"; - - @SerializedName(SERIALIZED_NAME_USER_TOKEN) + @SerializedName("userToken") private String userToken; - public static final String SERIALIZED_NAME_GET_RANKING_INFO = - "getRankingInfo"; - - @SerializedName(SERIALIZED_NAME_GET_RANKING_INFO) + @SerializedName("getRankingInfo") private Boolean getRankingInfo = false; - public static final String SERIALIZED_NAME_CLICK_ANALYTICS = "clickAnalytics"; - - @SerializedName(SERIALIZED_NAME_CLICK_ANALYTICS) + @SerializedName("clickAnalytics") private Boolean clickAnalytics = false; - public static final String SERIALIZED_NAME_ANALYTICS = "analytics"; - - @SerializedName(SERIALIZED_NAME_ANALYTICS) + @SerializedName("analytics") private Boolean analytics = true; - public static final String SERIALIZED_NAME_ANALYTICS_TAGS = "analyticsTags"; - - @SerializedName(SERIALIZED_NAME_ANALYTICS_TAGS) + @SerializedName("analyticsTags") private List analyticsTags = null; - public static final String SERIALIZED_NAME_PERCENTILE_COMPUTATION = - "percentileComputation"; - - @SerializedName(SERIALIZED_NAME_PERCENTILE_COMPUTATION) + @SerializedName("percentileComputation") private Boolean percentileComputation = true; - public static final String SERIALIZED_NAME_ENABLE_A_B_TEST = "enableABTest"; - - @SerializedName(SERIALIZED_NAME_ENABLE_A_B_TEST) + @SerializedName("enableABTest") private Boolean enableABTest = true; - public static final String SERIALIZED_NAME_ENABLE_RE_RANKING = - "enableReRanking"; - - @SerializedName(SERIALIZED_NAME_ENABLE_RE_RANKING) + @SerializedName("enableReRanking") private Boolean enableReRanking = true; public BaseSearchParams query(String query) { @@ -202,7 +121,6 @@ public BaseSearchParams query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { return query; } @@ -223,10 +141,6 @@ public BaseSearchParams similarQuery(String similarQuery) { * @return similarQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Overrides the query parameter and performs a more generic search that can be used to" + - " find \"similar\" results." - ) public String getSimilarQuery() { return similarQuery; } @@ -246,9 +160,6 @@ public BaseSearchParams filters(String filters) { * @return filters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Filter the query with numeric, facet and/or tag filters." - ) public String getFilters() { return filters; } @@ -276,7 +187,6 @@ public BaseSearchParams addFacetFiltersItem(String facetFiltersItem) { * @return facetFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter hits by facet value.") public List getFacetFilters() { return facetFilters; } @@ -305,10 +215,6 @@ public BaseSearchParams addOptionalFiltersItem(String optionalFiltersItem) { * @return optionalFilters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Create filters for ranking purposes, where records that match the filter are ranked" + - " higher, or lower in the case of a negative optional filter." - ) public List getOptionalFilters() { return optionalFilters; } @@ -336,7 +242,6 @@ public BaseSearchParams addNumericFiltersItem(String numericFiltersItem) { * @return numericFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter on numeric attributes.") public List getNumericFilters() { return numericFilters; } @@ -364,7 +269,6 @@ public BaseSearchParams addTagFiltersItem(String tagFiltersItem) { * @return tagFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter hits by tags.") public List getTagFilters() { return tagFilters; } @@ -384,9 +288,6 @@ public BaseSearchParams sumOrFiltersScores(Boolean sumOrFiltersScores) { * @return sumOrFiltersScores */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Determines how to calculate the total score for filtering." - ) public Boolean getSumOrFiltersScores() { return sumOrFiltersScores; } @@ -414,7 +315,6 @@ public BaseSearchParams addFacetsItem(String facetsItem) { * @return facets */ @javax.annotation.Nullable - @ApiModelProperty(value = "Retrieve facets and their facet values.") public List getFacets() { return facets; } @@ -434,9 +334,6 @@ public BaseSearchParams maxValuesPerFacet(Integer maxValuesPerFacet) { * @return maxValuesPerFacet */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet values to return for each facet during a regular search." - ) public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; } @@ -456,9 +353,6 @@ public BaseSearchParams facetingAfterDistinct(Boolean facetingAfterDistinct) { * @return facetingAfterDistinct */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Force faceting to be applied after de-duplication (via the Distinct setting)." - ) public Boolean getFacetingAfterDistinct() { return facetingAfterDistinct; } @@ -478,7 +372,6 @@ public BaseSearchParams sortFacetValuesBy(String sortFacetValuesBy) { * @return sortFacetValuesBy */ @javax.annotation.Nullable - @ApiModelProperty(value = "Controls how facet values are fetched.") public String getSortFacetValuesBy() { return sortFacetValuesBy; } @@ -498,7 +391,6 @@ public BaseSearchParams page(Integer page) { * @return page */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -518,7 +410,6 @@ public BaseSearchParams offset(Integer offset) { * @return offset */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the offset of the first hit to return.") public Integer getOffset() { return offset; } @@ -538,9 +429,6 @@ public BaseSearchParams length(Integer length) { * @return length */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Set the number of hits to retrieve (used only with offset)." - ) public Integer getLength() { return length; } @@ -560,10 +448,6 @@ public BaseSearchParams aroundLatLng(String aroundLatLng) { * @return aroundLatLng */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search for entries around a central geolocation, enabling a geo search within a circular" + - " area." - ) public String getAroundLatLng() { return aroundLatLng; } @@ -584,10 +468,6 @@ public BaseSearchParams aroundLatLngViaIP(Boolean aroundLatLngViaIP) { * @return aroundLatLngViaIP */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search for entries around a given location automatically computed from the requester's" + - " IP address." - ) public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; } @@ -607,9 +487,6 @@ public BaseSearchParams aroundRadius(OneOfintegerstring aroundRadius) { * @return aroundRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Define the maximum radius for a geo search (in meters)." - ) public OneOfintegerstring getAroundRadius() { return aroundRadius; } @@ -629,10 +506,6 @@ public BaseSearchParams aroundPrecision(Integer aroundPrecision) { * @return aroundPrecision */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Precision of geo search (in meters), to add grouping by geo location to the ranking" + - " formula." - ) public Integer getAroundPrecision() { return aroundPrecision; } @@ -652,9 +525,6 @@ public BaseSearchParams minimumAroundRadius(Integer minimumAroundRadius) { * @return minimumAroundRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum radius (in meters) used for a geo search when aroundRadius is not set." - ) public Integer getMinimumAroundRadius() { return minimumAroundRadius; } @@ -686,9 +556,6 @@ public BaseSearchParams addInsideBoundingBoxItem( * @return insideBoundingBox */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search inside a rectangular area (in geo coordinates)." - ) public List getInsideBoundingBox() { return insideBoundingBox; } @@ -716,7 +583,6 @@ public BaseSearchParams addInsidePolygonItem(BigDecimal insidePolygonItem) { * @return insidePolygon */ @javax.annotation.Nullable - @ApiModelProperty(value = "Search inside a polygon (in geo coordinates).") public List getInsidePolygon() { return insidePolygon; } @@ -748,13 +614,6 @@ public BaseSearchParams addNaturalLanguagesItem(String naturalLanguagesItem) { * @return naturalLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This parameter changes the default values of certain parameters and settings that work" + - " best for a natural language query, such as ignorePlurals, removeStopWords," + - " removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and" + - " settings work well together when the query is formatted in natural language" + - " instead of keywords, for example when your user performs a voice search." - ) public List getNaturalLanguages() { return naturalLanguages; } @@ -782,7 +641,6 @@ public BaseSearchParams addRuleContextsItem(String ruleContextsItem) { * @return ruleContexts */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables contextual rules.") public List getRuleContexts() { return ruleContexts; } @@ -802,7 +660,6 @@ public BaseSearchParams personalizationImpact(Integer personalizationImpact) { * @return personalizationImpact */ @javax.annotation.Nullable - @ApiModelProperty(value = "Define the impact of the Personalization feature.") public Integer getPersonalizationImpact() { return personalizationImpact; } @@ -822,9 +679,6 @@ public BaseSearchParams userToken(String userToken) { * @return userToken */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Associates a certain user token with the current search." - ) public String getUserToken() { return userToken; } @@ -844,7 +698,6 @@ public BaseSearchParams getRankingInfo(Boolean getRankingInfo) { * @return getRankingInfo */ @javax.annotation.Nullable - @ApiModelProperty(value = "Retrieve detailed ranking information.") public Boolean getGetRankingInfo() { return getRankingInfo; } @@ -864,7 +717,6 @@ public BaseSearchParams clickAnalytics(Boolean clickAnalytics) { * @return clickAnalytics */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enable the Click Analytics feature.") public Boolean getClickAnalytics() { return clickAnalytics; } @@ -884,9 +736,6 @@ public BaseSearchParams analytics(Boolean analytics) { * @return analytics */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the current query will be taken into account in the Analytics." - ) public Boolean getAnalytics() { return analytics; } @@ -914,9 +763,6 @@ public BaseSearchParams addAnalyticsTagsItem(String analyticsTagsItem) { * @return analyticsTags */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of tags to apply to the query for analytics purposes." - ) public List getAnalyticsTags() { return analyticsTags; } @@ -936,9 +782,6 @@ public BaseSearchParams percentileComputation(Boolean percentileComputation) { * @return percentileComputation */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to include or exclude a query from the processing-time percentile computation." - ) public Boolean getPercentileComputation() { return percentileComputation; } @@ -958,9 +801,6 @@ public BaseSearchParams enableABTest(Boolean enableABTest) { * @return enableABTest */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether this search should participate in running AB tests." - ) public Boolean getEnableABTest() { return enableABTest; } @@ -980,7 +820,6 @@ public BaseSearchParams enableReRanking(Boolean enableReRanking) { * @return enableReRanking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether this search should use AI Re-Ranking.") public Boolean getEnableReRanking() { return enableReRanking; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponse.java index bde9d461d3d..549c91ab1f2 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -9,130 +8,76 @@ /** BaseSearchResponse */ public class BaseSearchResponse { - public static final String SERIALIZED_NAME_AB_TEST_I_D = "abTestID"; - - @SerializedName(SERIALIZED_NAME_AB_TEST_I_D) + @SerializedName("abTestID") private Integer abTestID; - public static final String SERIALIZED_NAME_AB_TEST_VARIANT_I_D = - "abTestVariantID"; - - @SerializedName(SERIALIZED_NAME_AB_TEST_VARIANT_I_D) + @SerializedName("abTestVariantID") private Integer abTestVariantID; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG = "aroundLatLng"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG) + @SerializedName("aroundLatLng") private String aroundLatLng; - public static final String SERIALIZED_NAME_AUTOMATIC_RADIUS = - "automaticRadius"; - - @SerializedName(SERIALIZED_NAME_AUTOMATIC_RADIUS) + @SerializedName("automaticRadius") private String automaticRadius; - public static final String SERIALIZED_NAME_EXHAUSTIVE_FACETS_COUNT = - "exhaustiveFacetsCount"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_FACETS_COUNT) + @SerializedName("exhaustiveFacetsCount") private Boolean exhaustiveFacetsCount; - public static final String SERIALIZED_NAME_EXHAUSTIVE_NB_HITS = - "exhaustiveNbHits"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_NB_HITS) + @SerializedName("exhaustiveNbHits") private Boolean exhaustiveNbHits; - public static final String SERIALIZED_NAME_EXHAUSTIVE_TYPO = "exhaustiveTypo"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_TYPO) + @SerializedName("exhaustiveTypo") private Boolean exhaustiveTypo; - public static final String SERIALIZED_NAME_FACETS = "facets"; - - @SerializedName(SERIALIZED_NAME_FACETS) + @SerializedName("facets") private Map> facets = null; - public static final String SERIALIZED_NAME_FACETS_STATS = "facets_stats"; - - @SerializedName(SERIALIZED_NAME_FACETS_STATS) + @SerializedName("facets_stats") private Map facetsStats = null; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_INDEX = "index"; - - @SerializedName(SERIALIZED_NAME_INDEX) + @SerializedName("index") private String index; - public static final String SERIALIZED_NAME_INDEX_USED = "indexUsed"; - - @SerializedName(SERIALIZED_NAME_INDEX_USED) + @SerializedName("indexUsed") private String indexUsed; - public static final String SERIALIZED_NAME_MESSAGE = "message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) + @SerializedName("message") private String message; - public static final String SERIALIZED_NAME_NB_HITS = "nbHits"; - - @SerializedName(SERIALIZED_NAME_NB_HITS) + @SerializedName("nbHits") private Integer nbHits; - public static final String SERIALIZED_NAME_NB_PAGES = "nbPages"; - - @SerializedName(SERIALIZED_NAME_NB_PAGES) + @SerializedName("nbPages") private Integer nbPages; - public static final String SERIALIZED_NAME_NB_SORTED_HITS = "nbSortedHits"; - - @SerializedName(SERIALIZED_NAME_NB_SORTED_HITS) + @SerializedName("nbSortedHits") private Integer nbSortedHits; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params; - public static final String SERIALIZED_NAME_PARSED_QUERY = "parsedQuery"; - - @SerializedName(SERIALIZED_NAME_PARSED_QUERY) + @SerializedName("parsedQuery") private String parsedQuery; - public static final String SERIALIZED_NAME_PROCESSING_TIME_M_S = - "processingTimeMS"; - - @SerializedName(SERIALIZED_NAME_PROCESSING_TIME_M_S) + @SerializedName("processingTimeMS") private Integer processingTimeMS; - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_QUERY_AFTER_REMOVAL = - "queryAfterRemoval"; - - @SerializedName(SERIALIZED_NAME_QUERY_AFTER_REMOVAL) + @SerializedName("queryAfterRemoval") private String queryAfterRemoval; - public static final String SERIALIZED_NAME_SERVER_USED = "serverUsed"; - - @SerializedName(SERIALIZED_NAME_SERVER_USED) + @SerializedName("serverUsed") private String serverUsed; - public static final String SERIALIZED_NAME_USER_DATA = "userData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) + @SerializedName("userData") private Map userData = null; public BaseSearchResponse abTestID(Integer abTestID) { @@ -147,10 +92,6 @@ public BaseSearchResponse abTestID(Integer abTestID) { * @return abTestID */ @javax.annotation.Nullable - @ApiModelProperty( - value = "If a search encounters an index that is being A/B tested, abTestID reports the ongoing" + - " A/B test ID." - ) public Integer getAbTestID() { return abTestID; } @@ -171,10 +112,6 @@ public BaseSearchResponse abTestVariantID(Integer abTestVariantID) { * @return abTestVariantID */ @javax.annotation.Nullable - @ApiModelProperty( - value = "If a search encounters an index that is being A/B tested, abTestVariantID reports the" + - " variant ID of the index used." - ) public Integer getAbTestVariantID() { return abTestVariantID; } @@ -194,7 +131,6 @@ public BaseSearchResponse aroundLatLng(String aroundLatLng) { * @return aroundLatLng */ @javax.annotation.Nullable - @ApiModelProperty(value = "The computed geo location.") public String getAroundLatLng() { return aroundLatLng; } @@ -215,10 +151,6 @@ public BaseSearchResponse automaticRadius(String automaticRadius) { * @return automaticRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The automatically computed radius. For legacy reasons, this parameter is a string and" + - " not an integer." - ) public String getAutomaticRadius() { return automaticRadius; } @@ -240,9 +172,6 @@ public BaseSearchResponse exhaustiveFacetsCount( * @return exhaustiveFacetsCount */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the facet count is exhaustive or approximate." - ) public Boolean getExhaustiveFacetsCount() { return exhaustiveFacetsCount; } @@ -262,10 +191,6 @@ public BaseSearchResponse exhaustiveNbHits(Boolean exhaustiveNbHits) { * @return exhaustiveNbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Indicate if the nbHits count was exhaustive or approximate" - ) public Boolean getExhaustiveNbHits() { return exhaustiveNbHits; } @@ -286,11 +211,6 @@ public BaseSearchResponse exhaustiveTypo(Boolean exhaustiveTypo) { * @return exhaustiveTypo */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Indicate if the typo-tolerence search was exhaustive or approximate (only included when" + - " typo-tolerance is enabled)" - ) public Boolean getExhaustiveTypo() { return exhaustiveTypo; } @@ -321,10 +241,6 @@ public BaseSearchResponse putFacetsItem( * @return facets */ @javax.annotation.Nullable - @ApiModelProperty( - example = "{\"category\":{\"food\":1,\"tech\":42}}", - value = "A mapping of each facet name to the corresponding facet counts." - ) public Map> getFacets() { return facets; } @@ -357,7 +273,6 @@ public BaseSearchResponse putFacetsStatsItem( * @return facetsStats */ @javax.annotation.Nullable - @ApiModelProperty(value = "Statistics for numerical facets.") public Map getFacetsStats() { return facetsStats; } @@ -379,7 +294,6 @@ public BaseSearchResponse hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -399,10 +313,6 @@ public BaseSearchResponse index(String index) { * @return index */ @javax.annotation.Nullable - @ApiModelProperty( - example = "indexName", - value = "Index name used for the query." - ) public String getIndex() { return index; } @@ -423,11 +333,6 @@ public BaseSearchResponse indexUsed(String indexUsed) { * @return indexUsed */ @javax.annotation.Nullable - @ApiModelProperty( - example = "indexNameAlt", - value = "Index name used for the query. In the case of an A/B test, the targeted index isn't" + - " always the index used by the query." - ) public String getIndexUsed() { return indexUsed; } @@ -447,7 +352,6 @@ public BaseSearchResponse message(String message) { * @return message */ @javax.annotation.Nullable - @ApiModelProperty(value = "Used to return warnings about the query.") public String getMessage() { return message; } @@ -467,11 +371,6 @@ public BaseSearchResponse nbHits(Integer nbHits) { * @return nbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Number of hits that the search query matched." - ) public Integer getNbHits() { return nbHits; } @@ -491,11 +390,6 @@ public BaseSearchResponse nbPages(Integer nbPages) { * @return nbPages */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "1", - required = true, - value = "Number of pages available for the current query" - ) public Integer getNbPages() { return nbPages; } @@ -515,10 +409,6 @@ public BaseSearchResponse nbSortedHits(Integer nbSortedHits) { * @return nbSortedHits */ @javax.annotation.Nullable - @ApiModelProperty( - example = "20", - value = "The number of hits selected and sorted by the relevant sort algorithm" - ) public Integer getNbSortedHits() { return nbSortedHits; } @@ -538,7 +428,6 @@ public BaseSearchResponse page(Integer page) { * @return page */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -558,11 +447,6 @@ public BaseSearchResponse params(String params) { * @return params */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "query=a&hitsPerPage=20", - required = true, - value = "A url-encoded string of all search parameters." - ) public String getParams() { return params; } @@ -582,9 +466,6 @@ public BaseSearchResponse parsedQuery(String parsedQuery) { * @return parsedQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The query string that will be searched, after normalization." - ) public String getParsedQuery() { return parsedQuery; } @@ -604,11 +485,6 @@ public BaseSearchResponse processingTimeMS(Integer processingTimeMS) { * @return processingTimeMS */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Time the server took to process the request, in milliseconds." - ) public Integer getProcessingTimeMS() { return processingTimeMS; } @@ -628,7 +504,6 @@ public BaseSearchResponse query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { return query; } @@ -649,10 +524,6 @@ public BaseSearchResponse queryAfterRemoval(String queryAfterRemoval) { * @return queryAfterRemoval */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A markup text indicating which parts of the original query have been removed in order to" + - " retrieve a non-empty result set." - ) public String getQueryAfterRemoval() { return queryAfterRemoval; } @@ -672,9 +543,6 @@ public BaseSearchResponse serverUsed(String serverUsed) { * @return serverUsed */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Actual host name of the server that processed the request." - ) public String getServerUsed() { return serverUsed; } @@ -702,7 +570,6 @@ public BaseSearchResponse putUserDataItem(String key, Object userDataItem) { * @return userData */ @javax.annotation.Nullable - @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { return userData; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponseFacetsStats.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponseFacetsStats.java index 390f261989d..ddf47b67744 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponseFacetsStats.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchResponseFacetsStats.java @@ -1,30 +1,21 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** BaseSearchResponseFacetsStats */ public class BaseSearchResponseFacetsStats { - public static final String SERIALIZED_NAME_MIN = "min"; - - @SerializedName(SERIALIZED_NAME_MIN) + @SerializedName("min") private Integer min; - public static final String SERIALIZED_NAME_MAX = "max"; - - @SerializedName(SERIALIZED_NAME_MAX) + @SerializedName("max") private Integer max; - public static final String SERIALIZED_NAME_AVG = "avg"; - - @SerializedName(SERIALIZED_NAME_AVG) + @SerializedName("avg") private Integer avg; - public static final String SERIALIZED_NAME_SUM = "sum"; - - @SerializedName(SERIALIZED_NAME_SUM) + @SerializedName("sum") private Integer sum; public BaseSearchResponseFacetsStats min(Integer min) { @@ -38,7 +29,6 @@ public BaseSearchResponseFacetsStats min(Integer min) { * @return min */ @javax.annotation.Nullable - @ApiModelProperty(value = "The minimum value in the result set.") public Integer getMin() { return min; } @@ -58,7 +48,6 @@ public BaseSearchResponseFacetsStats max(Integer max) { * @return max */ @javax.annotation.Nullable - @ApiModelProperty(value = "The maximum value in the result set.") public Integer getMax() { return max; } @@ -78,7 +67,6 @@ public BaseSearchResponseFacetsStats avg(Integer avg) { * @return avg */ @javax.annotation.Nullable - @ApiModelProperty(value = "The average facet value in the result set.") public Integer getAvg() { return avg; } @@ -98,7 +86,6 @@ public BaseSearchResponseFacetsStats sum(Integer sum) { * @return sum */ @javax.annotation.Nullable - @ApiModelProperty(value = "The sum of all values in the result set.") public Integer getSum() { return sum; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsObject.java index 867b2e25eb7..43bdef7e6c9 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsObject.java @@ -1,24 +1,17 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Assign userID object. */ -@ApiModel(description = "Assign userID object.") public class BatchAssignUserIdsObject { - public static final String SERIALIZED_NAME_CLUSTER = "cluster"; - - @SerializedName(SERIALIZED_NAME_CLUSTER) + @SerializedName("cluster") private String cluster; - public static final String SERIALIZED_NAME_USERS = "users"; - - @SerializedName(SERIALIZED_NAME_USERS) + @SerializedName("users") private List users = new ArrayList<>(); public BatchAssignUserIdsObject cluster(String cluster) { @@ -32,11 +25,6 @@ public BatchAssignUserIdsObject cluster(String cluster) { * @return cluster */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "c11-test", - required = true, - value = "Name of the cluster." - ) public String getCluster() { return cluster; } @@ -61,10 +49,6 @@ public BatchAssignUserIdsObject addUsersItem(String usersItem) { * @return users */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "userIDs to assign. Note you cannot move users with this method." - ) public List getUsers() { return users; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntries.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntries.java index 8ad34fb45a0..d45f5ac17d7 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntries.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntries.java @@ -1,25 +1,17 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** The `batchDictionaryEntries` requests. */ -@ApiModel(description = "The `batchDictionaryEntries` requests.") public class BatchDictionaryEntries { - public static final String SERIALIZED_NAME_CLEAR_EXISTING_DICTIONARY_ENTRIES = - "clearExistingDictionaryEntries"; - - @SerializedName(SERIALIZED_NAME_CLEAR_EXISTING_DICTIONARY_ENTRIES) + @SerializedName("clearExistingDictionaryEntries") private Boolean clearExistingDictionaryEntries = false; - public static final String SERIALIZED_NAME_REQUESTS = "requests"; - - @SerializedName(SERIALIZED_NAME_REQUESTS) + @SerializedName("requests") private List requests = new ArrayList<>(); public BatchDictionaryEntries clearExistingDictionaryEntries( @@ -35,9 +27,6 @@ public BatchDictionaryEntries clearExistingDictionaryEntries( * @return clearExistingDictionaryEntries */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When `true`, start the batch by removing all the custom entries from the dictionary." - ) public Boolean getClearExistingDictionaryEntries() { return clearExistingDictionaryEntries; } @@ -68,10 +57,6 @@ public BatchDictionaryEntries addRequestsItem( * @return requests */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "List of operations to batch. Each operation is described by an `action` and a `body`." - ) public List getRequests() { return requests; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntriesRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntriesRequest.java index 4fbbe50cd86..17a3d3e91c2 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntriesRequest.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntriesRequest.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.Objects; @@ -61,14 +60,10 @@ public ActionEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_ACTION = "action"; - - @SerializedName(SERIALIZED_NAME_ACTION) + @SerializedName("action") private ActionEnum action; - public static final String SERIALIZED_NAME_BODY = "body"; - - @SerializedName(SERIALIZED_NAME_BODY) + @SerializedName("body") private DictionaryEntry body; public BatchDictionaryEntriesRequest action(ActionEnum action) { @@ -82,7 +77,6 @@ public BatchDictionaryEntriesRequest action(ActionEnum action) { * @return action */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Actions to perform.") public ActionEnum getAction() { return action; } @@ -102,7 +96,6 @@ public BatchDictionaryEntriesRequest body(DictionaryEntry body) { * @return body */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public DictionaryEntry getBody() { return body; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchObject.java index e3f053211a0..ac4c63d6b83 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchObject.java @@ -1,19 +1,14 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** The `batch` requests. */ -@ApiModel(description = "The `batch` requests.") public class BatchObject { - public static final String SERIALIZED_NAME_REQUESTS = "requests"; - - @SerializedName(SERIALIZED_NAME_REQUESTS) + @SerializedName("requests") private List requests = null; public BatchObject requests(List requests) { @@ -35,7 +30,6 @@ public BatchObject addRequestsItem(Operation requestsItem) { * @return requests */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRequests() { return requests; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchResponse.java index 9d8a55c551a..892212171fb 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,14 +8,10 @@ /** BatchResponse */ public class BatchResponse { - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Integer taskID; - public static final String SERIALIZED_NAME_OBJECT_I_DS = "objectIDs"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_DS) + @SerializedName("objectIDs") private List objectIDs = null; public BatchResponse taskID(Integer taskID) { @@ -30,7 +25,6 @@ public BatchResponse taskID(Integer taskID) { * @return taskID */ @javax.annotation.Nullable - @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { return taskID; } @@ -58,7 +52,6 @@ public BatchResponse addObjectIDsItem(String objectIDsItem) { * @return objectIDs */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of objectID.") public List getObjectIDs() { return objectIDs; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteObject.java index 5dbe4c034df..fd863d5d6f5 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteObject.java @@ -1,19 +1,14 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** The `batch` requests. */ -@ApiModel(description = "The `batch` requests.") public class BatchWriteObject { - public static final String SERIALIZED_NAME_REQUESTS = "requests"; - - @SerializedName(SERIALIZED_NAME_REQUESTS) + @SerializedName("requests") private List requests = null; public BatchWriteObject requests(List requests) { @@ -35,7 +30,6 @@ public BatchWriteObject addRequestsItem(Operation requestsItem) { * @return requests */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRequests() { return requests; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseRequest.java index 573f32c146b..c412ea0feec 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseRequest.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseRequest.java @@ -1,20 +1,15 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** BrowseRequest */ public class BrowseRequest { - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params = ""; - public static final String SERIALIZED_NAME_CURSOR = "cursor"; - - @SerializedName(SERIALIZED_NAME_CURSOR) + @SerializedName("cursor") private String cursor; public BrowseRequest params(String params) { @@ -28,7 +23,6 @@ public BrowseRequest params(String params) { * @return params */ @javax.annotation.Nullable - @ApiModelProperty(value = "Search parameters as URL-encoded query string.") public String getParams() { return params; } @@ -49,11 +43,6 @@ public BrowseRequest cursor(String cursor) { * @return cursor */ @javax.annotation.Nullable - @ApiModelProperty( - example = "jMDY3M2MwM2QwMWUxMmQwYWI0ZTN", - value = "Cursor indicating the location to resume browsing from. Must match the value returned by" + - " the previous call." - ) public String getCursor() { return cursor; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java index 8f51f3ff92e..c3d357a75b9 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -11,140 +10,82 @@ /** BrowseResponse */ public class BrowseResponse { - public static final String SERIALIZED_NAME_AB_TEST_I_D = "abTestID"; - - @SerializedName(SERIALIZED_NAME_AB_TEST_I_D) + @SerializedName("abTestID") private Integer abTestID; - public static final String SERIALIZED_NAME_AB_TEST_VARIANT_I_D = - "abTestVariantID"; - - @SerializedName(SERIALIZED_NAME_AB_TEST_VARIANT_I_D) + @SerializedName("abTestVariantID") private Integer abTestVariantID; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG = "aroundLatLng"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG) + @SerializedName("aroundLatLng") private String aroundLatLng; - public static final String SERIALIZED_NAME_AUTOMATIC_RADIUS = - "automaticRadius"; - - @SerializedName(SERIALIZED_NAME_AUTOMATIC_RADIUS) + @SerializedName("automaticRadius") private String automaticRadius; - public static final String SERIALIZED_NAME_EXHAUSTIVE_FACETS_COUNT = - "exhaustiveFacetsCount"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_FACETS_COUNT) + @SerializedName("exhaustiveFacetsCount") private Boolean exhaustiveFacetsCount; - public static final String SERIALIZED_NAME_EXHAUSTIVE_NB_HITS = - "exhaustiveNbHits"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_NB_HITS) + @SerializedName("exhaustiveNbHits") private Boolean exhaustiveNbHits; - public static final String SERIALIZED_NAME_EXHAUSTIVE_TYPO = "exhaustiveTypo"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_TYPO) + @SerializedName("exhaustiveTypo") private Boolean exhaustiveTypo; - public static final String SERIALIZED_NAME_FACETS = "facets"; - - @SerializedName(SERIALIZED_NAME_FACETS) + @SerializedName("facets") private Map> facets = null; - public static final String SERIALIZED_NAME_FACETS_STATS = "facets_stats"; - - @SerializedName(SERIALIZED_NAME_FACETS_STATS) + @SerializedName("facets_stats") private Map facetsStats = null; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_INDEX = "index"; - - @SerializedName(SERIALIZED_NAME_INDEX) + @SerializedName("index") private String index; - public static final String SERIALIZED_NAME_INDEX_USED = "indexUsed"; - - @SerializedName(SERIALIZED_NAME_INDEX_USED) + @SerializedName("indexUsed") private String indexUsed; - public static final String SERIALIZED_NAME_MESSAGE = "message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) + @SerializedName("message") private String message; - public static final String SERIALIZED_NAME_NB_HITS = "nbHits"; - - @SerializedName(SERIALIZED_NAME_NB_HITS) + @SerializedName("nbHits") private Integer nbHits; - public static final String SERIALIZED_NAME_NB_PAGES = "nbPages"; - - @SerializedName(SERIALIZED_NAME_NB_PAGES) + @SerializedName("nbPages") private Integer nbPages; - public static final String SERIALIZED_NAME_NB_SORTED_HITS = "nbSortedHits"; - - @SerializedName(SERIALIZED_NAME_NB_SORTED_HITS) + @SerializedName("nbSortedHits") private Integer nbSortedHits; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params; - public static final String SERIALIZED_NAME_PARSED_QUERY = "parsedQuery"; - - @SerializedName(SERIALIZED_NAME_PARSED_QUERY) + @SerializedName("parsedQuery") private String parsedQuery; - public static final String SERIALIZED_NAME_PROCESSING_TIME_M_S = - "processingTimeMS"; - - @SerializedName(SERIALIZED_NAME_PROCESSING_TIME_M_S) + @SerializedName("processingTimeMS") private Integer processingTimeMS; - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_QUERY_AFTER_REMOVAL = - "queryAfterRemoval"; - - @SerializedName(SERIALIZED_NAME_QUERY_AFTER_REMOVAL) + @SerializedName("queryAfterRemoval") private String queryAfterRemoval; - public static final String SERIALIZED_NAME_SERVER_USED = "serverUsed"; - - @SerializedName(SERIALIZED_NAME_SERVER_USED) + @SerializedName("serverUsed") private String serverUsed; - public static final String SERIALIZED_NAME_USER_DATA = "userData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) + @SerializedName("userData") private Map userData = null; - public static final String SERIALIZED_NAME_HITS = "hits"; - - @SerializedName(SERIALIZED_NAME_HITS) + @SerializedName("hits") private List hits = new ArrayList<>(); - public static final String SERIALIZED_NAME_CURSOR = "cursor"; - - @SerializedName(SERIALIZED_NAME_CURSOR) + @SerializedName("cursor") private String cursor; public BrowseResponse abTestID(Integer abTestID) { @@ -159,10 +100,6 @@ public BrowseResponse abTestID(Integer abTestID) { * @return abTestID */ @javax.annotation.Nullable - @ApiModelProperty( - value = "If a search encounters an index that is being A/B tested, abTestID reports the ongoing" + - " A/B test ID." - ) public Integer getAbTestID() { return abTestID; } @@ -183,10 +120,6 @@ public BrowseResponse abTestVariantID(Integer abTestVariantID) { * @return abTestVariantID */ @javax.annotation.Nullable - @ApiModelProperty( - value = "If a search encounters an index that is being A/B tested, abTestVariantID reports the" + - " variant ID of the index used." - ) public Integer getAbTestVariantID() { return abTestVariantID; } @@ -206,7 +139,6 @@ public BrowseResponse aroundLatLng(String aroundLatLng) { * @return aroundLatLng */ @javax.annotation.Nullable - @ApiModelProperty(value = "The computed geo location.") public String getAroundLatLng() { return aroundLatLng; } @@ -227,10 +159,6 @@ public BrowseResponse automaticRadius(String automaticRadius) { * @return automaticRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The automatically computed radius. For legacy reasons, this parameter is a string and" + - " not an integer." - ) public String getAutomaticRadius() { return automaticRadius; } @@ -250,9 +178,6 @@ public BrowseResponse exhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { * @return exhaustiveFacetsCount */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the facet count is exhaustive or approximate." - ) public Boolean getExhaustiveFacetsCount() { return exhaustiveFacetsCount; } @@ -272,10 +197,6 @@ public BrowseResponse exhaustiveNbHits(Boolean exhaustiveNbHits) { * @return exhaustiveNbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Indicate if the nbHits count was exhaustive or approximate" - ) public Boolean getExhaustiveNbHits() { return exhaustiveNbHits; } @@ -296,11 +217,6 @@ public BrowseResponse exhaustiveTypo(Boolean exhaustiveTypo) { * @return exhaustiveTypo */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Indicate if the typo-tolerence search was exhaustive or approximate (only included when" + - " typo-tolerance is enabled)" - ) public Boolean getExhaustiveTypo() { return exhaustiveTypo; } @@ -331,10 +247,6 @@ public BrowseResponse putFacetsItem( * @return facets */ @javax.annotation.Nullable - @ApiModelProperty( - example = "{\"category\":{\"food\":1,\"tech\":42}}", - value = "A mapping of each facet name to the corresponding facet counts." - ) public Map> getFacets() { return facets; } @@ -367,7 +279,6 @@ public BrowseResponse putFacetsStatsItem( * @return facetsStats */ @javax.annotation.Nullable - @ApiModelProperty(value = "Statistics for numerical facets.") public Map getFacetsStats() { return facetsStats; } @@ -389,7 +300,6 @@ public BrowseResponse hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -409,10 +319,6 @@ public BrowseResponse index(String index) { * @return index */ @javax.annotation.Nullable - @ApiModelProperty( - example = "indexName", - value = "Index name used for the query." - ) public String getIndex() { return index; } @@ -433,11 +339,6 @@ public BrowseResponse indexUsed(String indexUsed) { * @return indexUsed */ @javax.annotation.Nullable - @ApiModelProperty( - example = "indexNameAlt", - value = "Index name used for the query. In the case of an A/B test, the targeted index isn't" + - " always the index used by the query." - ) public String getIndexUsed() { return indexUsed; } @@ -457,7 +358,6 @@ public BrowseResponse message(String message) { * @return message */ @javax.annotation.Nullable - @ApiModelProperty(value = "Used to return warnings about the query.") public String getMessage() { return message; } @@ -477,11 +377,6 @@ public BrowseResponse nbHits(Integer nbHits) { * @return nbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Number of hits that the search query matched." - ) public Integer getNbHits() { return nbHits; } @@ -501,11 +396,6 @@ public BrowseResponse nbPages(Integer nbPages) { * @return nbPages */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "1", - required = true, - value = "Number of pages available for the current query" - ) public Integer getNbPages() { return nbPages; } @@ -525,10 +415,6 @@ public BrowseResponse nbSortedHits(Integer nbSortedHits) { * @return nbSortedHits */ @javax.annotation.Nullable - @ApiModelProperty( - example = "20", - value = "The number of hits selected and sorted by the relevant sort algorithm" - ) public Integer getNbSortedHits() { return nbSortedHits; } @@ -548,7 +434,6 @@ public BrowseResponse page(Integer page) { * @return page */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -568,11 +453,6 @@ public BrowseResponse params(String params) { * @return params */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "query=a&hitsPerPage=20", - required = true, - value = "A url-encoded string of all search parameters." - ) public String getParams() { return params; } @@ -592,9 +472,6 @@ public BrowseResponse parsedQuery(String parsedQuery) { * @return parsedQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The query string that will be searched, after normalization." - ) public String getParsedQuery() { return parsedQuery; } @@ -614,11 +491,6 @@ public BrowseResponse processingTimeMS(Integer processingTimeMS) { * @return processingTimeMS */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Time the server took to process the request, in milliseconds." - ) public Integer getProcessingTimeMS() { return processingTimeMS; } @@ -638,7 +510,6 @@ public BrowseResponse query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { return query; } @@ -659,10 +530,6 @@ public BrowseResponse queryAfterRemoval(String queryAfterRemoval) { * @return queryAfterRemoval */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A markup text indicating which parts of the original query have been removed in order to" + - " retrieve a non-empty result set." - ) public String getQueryAfterRemoval() { return queryAfterRemoval; } @@ -682,9 +549,6 @@ public BrowseResponse serverUsed(String serverUsed) { * @return serverUsed */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Actual host name of the server that processed the request." - ) public String getServerUsed() { return serverUsed; } @@ -712,7 +576,6 @@ public BrowseResponse putUserDataItem(String key, Object userDataItem) { * @return userData */ @javax.annotation.Nullable - @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { return userData; } @@ -737,7 +600,6 @@ public BrowseResponse addHitsItem(Record hitsItem) { * @return hits */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public List getHits() { return hits; } @@ -758,12 +620,6 @@ public BrowseResponse cursor(String cursor) { * @return cursor */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "jMDY3M2MwM2QwMWUxMmQwYWI0ZTN", - required = true, - value = "Cursor indicating the location to resume browsing from. Must match the value returned by" + - " the previous call." - ) public String getCursor() { return cursor; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BuildInOperation.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BuildInOperation.java index db7edbd76e0..eab55ee1265 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BuildInOperation.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BuildInOperation.java @@ -5,18 +5,12 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.Objects; /** * To update an attribute without pushing the entire record, you can use these built-in operations. */ -@ApiModel( - description = "To update an attribute without pushing the entire record, you can use these built-in" + - " operations." -) public class BuildInOperation { /** The operation to apply on the attribute. */ @@ -79,14 +73,10 @@ public OperationEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_OPERATION = "_operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) + @SerializedName("_operation") private OperationEnum operation; - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) + @SerializedName("value") private String value; public BuildInOperation operation(OperationEnum operation) { @@ -100,10 +90,6 @@ public BuildInOperation operation(OperationEnum operation) { * @return operation */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "The operation to apply on the attribute." - ) public OperationEnum getOperation() { return operation; } @@ -124,11 +110,6 @@ public BuildInOperation value(String value) { * @return value */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "the right-hand side argument to the operation, for example, increment or decrement step," + - " value to add or remove." - ) public String getValue() { return value; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Condition.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Condition.java index cf05009dbc9..c445c6bd592 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Condition.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Condition.java @@ -1,30 +1,21 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** Condition */ public class Condition { - public static final String SERIALIZED_NAME_PATTERN = "pattern"; - - @SerializedName(SERIALIZED_NAME_PATTERN) + @SerializedName("pattern") private String pattern; - public static final String SERIALIZED_NAME_ANCHORING = "anchoring"; - - @SerializedName(SERIALIZED_NAME_ANCHORING) + @SerializedName("anchoring") private Anchoring anchoring; - public static final String SERIALIZED_NAME_ALTERNATIVES = "alternatives"; - - @SerializedName(SERIALIZED_NAME_ALTERNATIVES) + @SerializedName("alternatives") private Boolean alternatives = false; - public static final String SERIALIZED_NAME_CONTEXT = "context"; - - @SerializedName(SERIALIZED_NAME_CONTEXT) + @SerializedName("context") private String context; public Condition pattern(String pattern) { @@ -38,7 +29,6 @@ public Condition pattern(String pattern) { * @return pattern */ @javax.annotation.Nullable - @ApiModelProperty(value = "Query pattern syntax") public String getPattern() { return pattern; } @@ -58,7 +48,6 @@ public Condition anchoring(Anchoring anchoring) { * @return anchoring */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Anchoring getAnchoring() { return anchoring; } @@ -78,9 +67,6 @@ public Condition alternatives(Boolean alternatives) { * @return alternatives */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the pattern matches on plurals, synonyms, and typos." - ) public Boolean getAlternatives() { return alternatives; } @@ -100,7 +86,6 @@ public Condition context(String context) { * @return context */ @javax.annotation.Nullable - @ApiModelProperty(value = "Rule context format: [A-Za-z0-9_-]+).") public String getContext() { return context; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Consequence.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Consequence.java index 8785f009f9e..25c2b70c9de 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Consequence.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Consequence.java @@ -1,8 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -10,32 +8,21 @@ import java.util.Objects; /** Consequence of the Rule. */ -@ApiModel(description = "Consequence of the Rule.") public class Consequence { - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private Params params; - public static final String SERIALIZED_NAME_PROMOTE = "promote"; - - @SerializedName(SERIALIZED_NAME_PROMOTE) + @SerializedName("promote") private List promote = null; - public static final String SERIALIZED_NAME_FILTER_PROMOTES = "filterPromotes"; - - @SerializedName(SERIALIZED_NAME_FILTER_PROMOTES) + @SerializedName("filterPromotes") private Boolean filterPromotes = false; - public static final String SERIALIZED_NAME_HIDE = "hide"; - - @SerializedName(SERIALIZED_NAME_HIDE) + @SerializedName("hide") private List hide = null; - public static final String SERIALIZED_NAME_USER_DATA = "userData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) + @SerializedName("userData") private Map userData = null; public Consequence params(Params params) { @@ -49,7 +36,6 @@ public Consequence params(Params params) { * @return params */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Params getParams() { return params; } @@ -77,7 +63,6 @@ public Consequence addPromoteItem(Promote promoteItem) { * @return promote */ @javax.annotation.Nullable - @ApiModelProperty(value = "Objects to promote as hits.") public List getPromote() { return promote; } @@ -99,11 +84,6 @@ public Consequence filterPromotes(Boolean filterPromotes) { * @return filterPromotes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Only use in combination with the promote consequence. When true, promoted results will" + - " be restricted to match the filters of the current search. When false, the" + - " promoted results will show up regardless of the filters." - ) public Boolean getFilterPromotes() { return filterPromotes; } @@ -132,10 +112,6 @@ public Consequence addHideItem(ConsequenceHide hideItem) { * @return hide */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Objects to hide from hits. Each object must contain an objectID field. By default, you" + - " can hide up to 50 items per rule." - ) public List getHide() { return hide; } @@ -164,10 +140,6 @@ public Consequence putUserDataItem(String key, Object userDataItem) { * @return userData */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Custom JSON object that will be appended to the userData array in the response. This" + - " object isn't interpreted by the API. It's limited to 1kB of minified JSON." - ) public Map getUserData() { return userData; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ConsequenceHide.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ConsequenceHide.java index 4ba47ec590c..eb08e8b59a0 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ConsequenceHide.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ConsequenceHide.java @@ -1,17 +1,12 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** Unique identifier of the object to hide. */ -@ApiModel(description = "Unique identifier of the object to hide.") public class ConsequenceHide { - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; public ConsequenceHide objectID(String objectID) { @@ -25,7 +20,6 @@ public ConsequenceHide objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unique identifier of the object.") public String getObjectID() { return objectID; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtObject.java index 0953db21b16..46f36a6d9fe 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtObject.java @@ -1,16 +1,13 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** CreatedAtObject */ public class CreatedAtObject { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - - @SerializedName(SERIALIZED_NAME_CREATED_AT) + @SerializedName("createdAt") private OffsetDateTime createdAt; public CreatedAtObject createdAt(OffsetDateTime createdAt) { @@ -24,10 +21,6 @@ public CreatedAtObject createdAt(OffsetDateTime createdAt) { * @return createdAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of creation (ISO-8601 format)." - ) public OffsetDateTime getCreatedAt() { return createdAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtResponse.java index 199391743f3..2a943a47c26 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/CreatedAtResponse.java @@ -1,18 +1,13 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** The response with a createdAt timestamp. */ -@ApiModel(description = "The response with a createdAt timestamp.") public class CreatedAtResponse { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - - @SerializedName(SERIALIZED_NAME_CREATED_AT) + @SerializedName("createdAt") private OffsetDateTime createdAt; public CreatedAtResponse createdAt(OffsetDateTime createdAt) { @@ -26,10 +21,6 @@ public CreatedAtResponse createdAt(OffsetDateTime createdAt) { * @return createdAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of creation (ISO-8601 format)." - ) public OffsetDateTime getCreatedAt() { return createdAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteApiKeyResponse.java index c17e344833d..89f08016409 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteApiKeyResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteApiKeyResponse.java @@ -1,16 +1,13 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** DeleteApiKeyResponse */ public class DeleteApiKeyResponse { - public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; - - @SerializedName(SERIALIZED_NAME_DELETED_AT) + @SerializedName("deletedAt") private OffsetDateTime deletedAt; public DeleteApiKeyResponse deletedAt(OffsetDateTime deletedAt) { @@ -24,10 +21,6 @@ public DeleteApiKeyResponse deletedAt(OffsetDateTime deletedAt) { * @return deletedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of deletion (ISO-8601 format)." - ) public OffsetDateTime getDeletedAt() { return deletedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSourceResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSourceResponse.java index 18ccd3412c2..956480b2e12 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSourceResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSourceResponse.java @@ -1,16 +1,13 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** DeleteSourceResponse */ public class DeleteSourceResponse { - public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; - - @SerializedName(SERIALIZED_NAME_DELETED_AT) + @SerializedName("deletedAt") private OffsetDateTime deletedAt; public DeleteSourceResponse deletedAt(OffsetDateTime deletedAt) { @@ -24,10 +21,6 @@ public DeleteSourceResponse deletedAt(OffsetDateTime deletedAt) { * @return deletedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of deletion (ISO-8601 format)." - ) public OffsetDateTime getDeletedAt() { return deletedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeletedAtResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeletedAtResponse.java index 9a442e84a7a..40cf4807321 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeletedAtResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeletedAtResponse.java @@ -1,23 +1,16 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** The response with a taskID and a deletedAt timestamp. */ -@ApiModel(description = "The response with a taskID and a deletedAt timestamp.") public class DeletedAtResponse { - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Integer taskID; - public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; - - @SerializedName(SERIALIZED_NAME_DELETED_AT) + @SerializedName("deletedAt") private OffsetDateTime deletedAt; public DeletedAtResponse taskID(Integer taskID) { @@ -31,10 +24,6 @@ public DeletedAtResponse taskID(Integer taskID) { * @return taskID */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "taskID of the indexing task to wait for." - ) public Integer getTaskID() { return taskID; } @@ -54,10 +43,6 @@ public DeletedAtResponse deletedAt(OffsetDateTime deletedAt) { * @return deletedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of deletion (ISO-8601 format)." - ) public OffsetDateTime getDeletedAt() { return deletedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryEntry.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryEntry.java index ea7ce5a6e78..767a555c79e 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryEntry.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryEntry.java @@ -5,8 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; @@ -14,32 +12,21 @@ import java.util.Objects; /** A dictionary entry. */ -@ApiModel(description = "A dictionary entry.") public class DictionaryEntry extends HashMap { - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; - public static final String SERIALIZED_NAME_LANGUAGE = "language"; - - @SerializedName(SERIALIZED_NAME_LANGUAGE) + @SerializedName("language") private String language; - public static final String SERIALIZED_NAME_WORD = "word"; - - @SerializedName(SERIALIZED_NAME_WORD) + @SerializedName("word") private String word; - public static final String SERIALIZED_NAME_WORDS = "words"; - - @SerializedName(SERIALIZED_NAME_WORDS) + @SerializedName("words") private List words = null; - public static final String SERIALIZED_NAME_DECOMPOSITION = "decomposition"; - - @SerializedName(SERIALIZED_NAME_DECOMPOSITION) + @SerializedName("decomposition") private List decomposition = null; /** The state of the dictionary entry. */ @@ -91,9 +78,7 @@ public StateEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_STATE = "state"; - - @SerializedName(SERIALIZED_NAME_STATE) + @SerializedName("state") private StateEnum state = StateEnum.ENABLED; public DictionaryEntry objectID(String objectID) { @@ -107,7 +92,6 @@ public DictionaryEntry objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unique identifier of the object.") public String getObjectID() { return objectID; } @@ -127,10 +111,6 @@ public DictionaryEntry language(String language) { * @return language */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Language ISO code supported by the dictionary (e.g., \"en\" for English)." - ) public String getLanguage() { return language; } @@ -150,7 +130,6 @@ public DictionaryEntry word(String word) { * @return word */ @javax.annotation.Nullable - @ApiModelProperty(value = "The word of the dictionary entry.") public String getWord() { return word; } @@ -178,7 +157,6 @@ public DictionaryEntry addWordsItem(String wordsItem) { * @return words */ @javax.annotation.Nullable - @ApiModelProperty(value = "The words of the dictionary entry.") public List getWords() { return words; } @@ -206,9 +184,6 @@ public DictionaryEntry addDecompositionItem(String decompositionItem) { * @return decomposition */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A decomposition of the word of the dictionary entry." - ) public List getDecomposition() { return decomposition; } @@ -228,7 +203,6 @@ public DictionaryEntry state(StateEnum state) { * @return state */ @javax.annotation.Nullable - @ApiModelProperty(value = "The state of the dictionary entry.") public StateEnum getState() { return state; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryLanguage.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryLanguage.java index 7aeede69515..fce794e0dc5 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryLanguage.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionaryLanguage.java @@ -1,18 +1,12 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** Custom entries for a dictionary */ -@ApiModel(description = "Custom entries for a dictionary") public class DictionaryLanguage { - public static final String SERIALIZED_NAME_NB_CUSTOM_ENTIRES = - "nbCustomEntires"; - - @SerializedName(SERIALIZED_NAME_NB_CUSTOM_ENTIRES) + @SerializedName("nbCustomEntires") private Integer nbCustomEntires; public DictionaryLanguage nbCustomEntires(Integer nbCustomEntires) { @@ -27,10 +21,6 @@ public DictionaryLanguage nbCustomEntires(Integer nbCustomEntires) { * @return nbCustomEntires */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When nbCustomEntries is set to 0, the user didn't customize the dictionary. The" + - " dictionary is still supported with standard, Algolia-provided entries." - ) public Integer getNbCustomEntires() { return nbCustomEntires; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionarySettingsRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionarySettingsRequest.java index 2c198b46c8f..3e2c34a3775 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionarySettingsRequest.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DictionarySettingsRequest.java @@ -1,20 +1,12 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** Disable the builtin Algolia entries for a type of dictionary per language. */ -@ApiModel( - description = "Disable the builtin Algolia entries for a type of dictionary per language." -) public class DictionarySettingsRequest { - public static final String SERIALIZED_NAME_DISABLE_STANDARD_ENTRIES = - "disableStandardEntries"; - - @SerializedName(SERIALIZED_NAME_DISABLE_STANDARD_ENTRIES) + @SerializedName("disableStandardEntries") private StandardEntries disableStandardEntries; public DictionarySettingsRequest disableStandardEntries( @@ -30,7 +22,6 @@ public DictionarySettingsRequest disableStandardEntries( * @return disableStandardEntries */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public StandardEntries getDisableStandardEntries() { return disableStandardEntries; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ErrorBase.java index 95ad6123009..c2828bf5d96 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ErrorBase.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ErrorBase.java @@ -1,18 +1,13 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Objects; /** Error. */ -@ApiModel(description = "Error.") public class ErrorBase extends HashMap { - public static final String SERIALIZED_NAME_MESSAGE = "message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) + @SerializedName("message") private String message; public ErrorBase message(String message) { @@ -26,7 +21,6 @@ public ErrorBase message(String message) { * @return message */ @javax.annotation.Nullable - @ApiModelProperty(example = "Invalid Application-Id or API-Key", value = "") public String getMessage() { return message; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetDictionarySettingsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetDictionarySettingsResponse.java index d81af1ea036..d622f2b32fa 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetDictionarySettingsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetDictionarySettingsResponse.java @@ -1,16 +1,12 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** GetDictionarySettingsResponse */ public class GetDictionarySettingsResponse { - public static final String SERIALIZED_NAME_DISABLE_STANDARD_ENTRIES = - "disableStandardEntries"; - - @SerializedName(SERIALIZED_NAME_DISABLE_STANDARD_ENTRIES) + @SerializedName("disableStandardEntries") private StandardEntries disableStandardEntries; public GetDictionarySettingsResponse disableStandardEntries( @@ -26,7 +22,6 @@ public GetDictionarySettingsResponse disableStandardEntries( * @return disableStandardEntries */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public StandardEntries getDisableStandardEntries() { return disableStandardEntries; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponse.java index e3792bb9d3c..346ab735ec7 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,9 +8,7 @@ /** GetLogsResponse */ public class GetLogsResponse { - public static final String SERIALIZED_NAME_LOGS = "logs"; - - @SerializedName(SERIALIZED_NAME_LOGS) + @SerializedName("logs") private List logs = new ArrayList<>(); public GetLogsResponse logs(List logs) { @@ -30,7 +27,6 @@ public GetLogsResponse addLogsItem(GetLogsResponseLogs logsItem) { * @return logs */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public List getLogs() { return logs; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseInnerQueries.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseInnerQueries.java index 83e28e53667..31a764dc56a 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseInnerQueries.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseInnerQueries.java @@ -1,25 +1,18 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** GetLogsResponseInnerQueries */ public class GetLogsResponseInnerQueries { - public static final String SERIALIZED_NAME_INDEX_NAME = "index_name"; - - @SerializedName(SERIALIZED_NAME_INDEX_NAME) + @SerializedName("index_name") private String indexName; - public static final String SERIALIZED_NAME_USER_TOKEN = "user_token"; - - @SerializedName(SERIALIZED_NAME_USER_TOKEN) + @SerializedName("user_token") private String userToken; - public static final String SERIALIZED_NAME_QUERY_ID = "query_id"; - - @SerializedName(SERIALIZED_NAME_QUERY_ID) + @SerializedName("query_id") private String queryId; public GetLogsResponseInnerQueries indexName(String indexName) { @@ -33,7 +26,6 @@ public GetLogsResponseInnerQueries indexName(String indexName) { * @return indexName */ @javax.annotation.Nullable - @ApiModelProperty(value = "Index targeted by the query.") public String getIndexName() { return indexName; } @@ -53,7 +45,6 @@ public GetLogsResponseInnerQueries userToken(String userToken) { * @return userToken */ @javax.annotation.Nullable - @ApiModelProperty(value = "User identifier.") public String getUserToken() { return userToken; } @@ -73,7 +64,6 @@ public GetLogsResponseInnerQueries queryId(String queryId) { * @return queryId */ @javax.annotation.Nullable - @ApiModelProperty(value = "QueryID for the given query.") public String getQueryId() { return queryId; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseLogs.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseLogs.java index 4edffb2515f..0438a94650d 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseLogs.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetLogsResponseLogs.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,80 +8,49 @@ /** GetLogsResponseLogs */ public class GetLogsResponseLogs { - public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; - - @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @SerializedName("timestamp") private String timestamp; - public static final String SERIALIZED_NAME_METHOD = "method"; - - @SerializedName(SERIALIZED_NAME_METHOD) + @SerializedName("method") private String method; - public static final String SERIALIZED_NAME_ANSWER_CODE = "answer_code"; - - @SerializedName(SERIALIZED_NAME_ANSWER_CODE) + @SerializedName("answer_code") private String answerCode; - public static final String SERIALIZED_NAME_QUERY_BODY = "query_body"; - - @SerializedName(SERIALIZED_NAME_QUERY_BODY) + @SerializedName("query_body") private String queryBody; - public static final String SERIALIZED_NAME_ANSWER = "answer"; - - @SerializedName(SERIALIZED_NAME_ANSWER) + @SerializedName("answer") private String answer; - public static final String SERIALIZED_NAME_URL = "url"; - - @SerializedName(SERIALIZED_NAME_URL) + @SerializedName("url") private String url; - public static final String SERIALIZED_NAME_IP = "ip"; - - @SerializedName(SERIALIZED_NAME_IP) + @SerializedName("ip") private String ip; - public static final String SERIALIZED_NAME_QUERY_HEADERS = "query_headers"; - - @SerializedName(SERIALIZED_NAME_QUERY_HEADERS) + @SerializedName("query_headers") private String queryHeaders; - public static final String SERIALIZED_NAME_SHA1 = "sha1"; - - @SerializedName(SERIALIZED_NAME_SHA1) + @SerializedName("sha1") private String sha1; - public static final String SERIALIZED_NAME_NB_API_CALLS = "nb_api_calls"; - - @SerializedName(SERIALIZED_NAME_NB_API_CALLS) + @SerializedName("nb_api_calls") private String nbApiCalls; - public static final String SERIALIZED_NAME_PROCESSING_TIME_MS = - "processing_time_ms"; - - @SerializedName(SERIALIZED_NAME_PROCESSING_TIME_MS) + @SerializedName("processing_time_ms") private String processingTimeMs; - public static final String SERIALIZED_NAME_INDEX = "index"; - - @SerializedName(SERIALIZED_NAME_INDEX) + @SerializedName("index") private String index; - public static final String SERIALIZED_NAME_QUERY_PARAMS = "query_params"; - - @SerializedName(SERIALIZED_NAME_QUERY_PARAMS) + @SerializedName("query_params") private String queryParams; - public static final String SERIALIZED_NAME_QUERY_NB_HITS = "query_nb_hits"; - - @SerializedName(SERIALIZED_NAME_QUERY_NB_HITS) + @SerializedName("query_nb_hits") private String queryNbHits; - public static final String SERIALIZED_NAME_INNER_QUERIES = "inner_queries"; - - @SerializedName(SERIALIZED_NAME_INNER_QUERIES) + @SerializedName("inner_queries") private List innerQueries = null; public GetLogsResponseLogs timestamp(String timestamp) { @@ -96,7 +64,6 @@ public GetLogsResponseLogs timestamp(String timestamp) { * @return timestamp */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Timestamp in ISO-8601 format.") public String getTimestamp() { return timestamp; } @@ -116,10 +83,6 @@ public GetLogsResponseLogs method(String method) { * @return method */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "HTTP method of the perfomed request." - ) public String getMethod() { return method; } @@ -139,7 +102,6 @@ public GetLogsResponseLogs answerCode(String answerCode) { * @return answerCode */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "HTTP response code.") public String getAnswerCode() { return answerCode; } @@ -159,10 +121,6 @@ public GetLogsResponseLogs queryBody(String queryBody) { * @return queryBody */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Request body. Truncated after 1000 characters." - ) public String getQueryBody() { return queryBody; } @@ -182,10 +140,6 @@ public GetLogsResponseLogs answer(String answer) { * @return answer */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Answer body. Truncated after 1000 characters." - ) public String getAnswer() { return answer; } @@ -205,7 +159,6 @@ public GetLogsResponseLogs url(String url) { * @return url */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Request URL.") public String getUrl() { return url; } @@ -225,10 +178,6 @@ public GetLogsResponseLogs ip(String ip) { * @return ip */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "IP of the client which perfomed the request." - ) public String getIp() { return ip; } @@ -248,10 +197,6 @@ public GetLogsResponseLogs queryHeaders(String queryHeaders) { * @return queryHeaders */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Request Headers (API Key is obfuscated)." - ) public String getQueryHeaders() { return queryHeaders; } @@ -271,7 +216,6 @@ public GetLogsResponseLogs sha1(String sha1) { * @return sha1 */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "SHA1 signature of the log entry.") public String getSha1() { return sha1; } @@ -291,7 +235,6 @@ public GetLogsResponseLogs nbApiCalls(String nbApiCalls) { * @return nbApiCalls */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Number of API calls.") public String getNbApiCalls() { return nbApiCalls; } @@ -311,10 +254,6 @@ public GetLogsResponseLogs processingTimeMs(String processingTimeMs) { * @return processingTimeMs */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Processing time for the query. It doesn't include network time." - ) public String getProcessingTimeMs() { return processingTimeMs; } @@ -334,7 +273,6 @@ public GetLogsResponseLogs index(String index) { * @return index */ @javax.annotation.Nullable - @ApiModelProperty(value = "Index targeted by the query.") public String getIndex() { return index; } @@ -354,7 +292,6 @@ public GetLogsResponseLogs queryParams(String queryParams) { * @return queryParams */ @javax.annotation.Nullable - @ApiModelProperty(value = "Query parameters sent with the request.") public String getQueryParams() { return queryParams; } @@ -374,7 +311,6 @@ public GetLogsResponseLogs queryNbHits(String queryNbHits) { * @return queryNbHits */ @javax.annotation.Nullable - @ApiModelProperty(value = "Number of hits returned for the query.") public String getQueryNbHits() { return queryNbHits; } @@ -406,9 +342,6 @@ public GetLogsResponseLogs addInnerQueriesItem( * @return innerQueries */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Array of all performed queries for the given request." - ) public List getInnerQueries() { return innerQueries; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsObject.java index e82d685a194..bc8facb4ae3 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsObject.java @@ -1,19 +1,14 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** The `getObjects` requests. */ -@ApiModel(description = "The `getObjects` requests.") public class GetObjectsObject { - public static final String SERIALIZED_NAME_REQUESTS = "requests"; - - @SerializedName(SERIALIZED_NAME_REQUESTS) + @SerializedName("requests") private List requests = null; public GetObjectsObject requests(List requests) { @@ -37,7 +32,6 @@ public GetObjectsObject addRequestsItem( * @return requests */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getRequests() { return requests; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsResponse.java index cb272ee3259..f18ee2401bc 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -10,9 +9,7 @@ /** GetObjectsResponse */ public class GetObjectsResponse { - public static final String SERIALIZED_NAME_RESULTS = "results"; - - @SerializedName(SERIALIZED_NAME_RESULTS) + @SerializedName("results") private List> results = null; public GetObjectsResponse results(List> results) { @@ -34,7 +31,6 @@ public GetObjectsResponse addResultsItem(Map resultsItem) { * @return results */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of results fetched.") public List> getResults() { return results; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTaskResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTaskResponse.java index 4335d762688..06fe5e2406f 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTaskResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTaskResponse.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.Objects; @@ -61,9 +60,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) + @SerializedName("status") private StatusEnum status; public GetTaskResponse status(StatusEnum status) { @@ -77,7 +74,6 @@ public GetTaskResponse status(StatusEnum status) { * @return status */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public StatusEnum getStatus() { return status; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTopUserIdsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTopUserIdsResponse.java index eb85a7a0f4f..94cf46ab3f7 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTopUserIdsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetTopUserIdsResponse.java @@ -1,20 +1,15 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; /** Array of userIDs and clusters. */ -@ApiModel(description = "Array of userIDs and clusters.") public class GetTopUserIdsResponse { - public static final String SERIALIZED_NAME_TOP_USERS = "topUsers"; - - @SerializedName(SERIALIZED_NAME_TOP_USERS) + @SerializedName("topUsers") private List>> topUsers = new ArrayList<>(); public GetTopUserIdsResponse topUsers( @@ -37,10 +32,6 @@ public GetTopUserIdsResponse addTopUsersItem( * @return topUsers */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Mapping of cluster names to top users." - ) public List>> getTopUsers() { return topUsers; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HighlightResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HighlightResult.java index 606dc0a201d..18aea7db1d7 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HighlightResult.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HighlightResult.java @@ -5,20 +5,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Highlighted attributes. */ -@ApiModel(description = "Highlighted attributes.") public class HighlightResult { - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) + @SerializedName("value") private String value; /** Indicates how well the attribute matched the search query. */ @@ -73,20 +68,13 @@ public MatchLevelEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_MATCH_LEVEL = "matchLevel"; - - @SerializedName(SERIALIZED_NAME_MATCH_LEVEL) + @SerializedName("matchLevel") private MatchLevelEnum matchLevel; - public static final String SERIALIZED_NAME_MATCHED_WORDS = "matchedWords"; - - @SerializedName(SERIALIZED_NAME_MATCHED_WORDS) + @SerializedName("matchedWords") private List matchedWords = null; - public static final String SERIALIZED_NAME_FULLY_HIGHLIGHTED = - "fullyHighlighted"; - - @SerializedName(SERIALIZED_NAME_FULLY_HIGHLIGHTED) + @SerializedName("fullyHighlighted") private Boolean fullyHighlighted; public HighlightResult value(String value) { @@ -100,10 +88,6 @@ public HighlightResult value(String value) { * @return value */ @javax.annotation.Nullable - @ApiModelProperty( - example = "George Clooney", - value = "Markup text with occurrences highlighted." - ) public String getValue() { return value; } @@ -123,9 +107,6 @@ public HighlightResult matchLevel(MatchLevelEnum matchLevel) { * @return matchLevel */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Indicates how well the attribute matched the search query." - ) public MatchLevelEnum getMatchLevel() { return matchLevel; } @@ -153,9 +134,6 @@ public HighlightResult addMatchedWordsItem(String matchedWordsItem) { * @return matchedWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of words from the query that matched the object." - ) public List getMatchedWords() { return matchedWords; } @@ -175,9 +153,6 @@ public HighlightResult fullyHighlighted(Boolean fullyHighlighted) { * @return fullyHighlighted */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the entire attribute value is highlighted." - ) public Boolean getFullyHighlighted() { return fullyHighlighted; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Index.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Index.java index 9f28608505e..5a4e51c4cd8 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Index.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Index.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; @@ -10,61 +9,37 @@ /** Index */ public class Index { - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) + @SerializedName("name") private String name; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - - @SerializedName(SERIALIZED_NAME_CREATED_AT) + @SerializedName("createdAt") private OffsetDateTime createdAt; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_ENTRIES = "entries"; - - @SerializedName(SERIALIZED_NAME_ENTRIES) + @SerializedName("entries") private Integer entries; - public static final String SERIALIZED_NAME_DATA_SIZE = "dataSize"; - - @SerializedName(SERIALIZED_NAME_DATA_SIZE) + @SerializedName("dataSize") private Integer dataSize; - public static final String SERIALIZED_NAME_FILE_SIZE = "fileSize"; - - @SerializedName(SERIALIZED_NAME_FILE_SIZE) + @SerializedName("fileSize") private Integer fileSize; - public static final String SERIALIZED_NAME_LAST_BUILD_TIME_S = - "lastBuildTimeS"; - - @SerializedName(SERIALIZED_NAME_LAST_BUILD_TIME_S) + @SerializedName("lastBuildTimeS") private Integer lastBuildTimeS; - public static final String SERIALIZED_NAME_NUMBER_OF_PENDING_TASK = - "numberOfPendingTask"; - - @SerializedName(SERIALIZED_NAME_NUMBER_OF_PENDING_TASK) + @SerializedName("numberOfPendingTask") private Integer numberOfPendingTask; - public static final String SERIALIZED_NAME_PENDING_TASK = "pendingTask"; - - @SerializedName(SERIALIZED_NAME_PENDING_TASK) + @SerializedName("pendingTask") private Boolean pendingTask; - public static final String SERIALIZED_NAME_PRIMARY = "primary"; - - @SerializedName(SERIALIZED_NAME_PRIMARY) + @SerializedName("primary") private String primary; - public static final String SERIALIZED_NAME_REPLICAS = "replicas"; - - @SerializedName(SERIALIZED_NAME_REPLICAS) + @SerializedName("replicas") private List replicas = null; public Index name(String name) { @@ -78,7 +53,6 @@ public Index name(String name) { * @return name */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Index name.") public String getName() { return name; } @@ -98,10 +72,6 @@ public Index createdAt(OffsetDateTime createdAt) { * @return createdAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Index creation date. An empty string means that the index has no records." - ) public OffsetDateTime getCreatedAt() { return createdAt; } @@ -121,10 +91,6 @@ public Index updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of last update (ISO-8601 format)." - ) public OffsetDateTime getUpdatedAt() { return updatedAt; } @@ -144,10 +110,6 @@ public Index entries(Integer entries) { * @return entries */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Number of records contained in the index." - ) public Integer getEntries() { return entries; } @@ -167,10 +129,6 @@ public Index dataSize(Integer dataSize) { * @return dataSize */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Number of bytes of the index in minified format." - ) public Integer getDataSize() { return dataSize; } @@ -190,10 +148,6 @@ public Index fileSize(Integer fileSize) { * @return fileSize */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Number of bytes of the index binary file." - ) public Integer getFileSize() { return fileSize; } @@ -213,7 +167,6 @@ public Index lastBuildTimeS(Integer lastBuildTimeS) { * @return lastBuildTimeS */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Last build time") public Integer getLastBuildTimeS() { return lastBuildTimeS; } @@ -233,9 +186,6 @@ public Index numberOfPendingTask(Integer numberOfPendingTask) { * @return numberOfPendingTask */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Number of pending indexing operations. This value is deprecated and should not be used." - ) public Integer getNumberOfPendingTask() { return numberOfPendingTask; } @@ -256,11 +206,6 @@ public Index pendingTask(Boolean pendingTask) { * @return pendingTask */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "A boolean which says whether the index has pending tasks. This value is deprecated and" + - " should not be used." - ) public Boolean getPendingTask() { return pendingTask; } @@ -280,9 +225,6 @@ public Index primary(String primary) { * @return primary */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Only present if the index is a replica. Contains the name of the related primary index." - ) public String getPrimary() { return primary; } @@ -311,10 +253,6 @@ public Index addReplicasItem(String replicasItem) { * @return replicas */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Only present if the index is a primary index with replicas. Contains the names of all" + - " linked replicas." - ) public List getReplicas() { return replicas; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettings.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettings.java index abc33070ae1..9da1b6feb0e 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettings.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettings.java @@ -5,8 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; @@ -15,174 +13,93 @@ import java.util.Objects; /** The Algolia index settings. */ -@ApiModel(description = "The Algolia index settings.") public class IndexSettings { - public static final String SERIALIZED_NAME_REPLICAS = "replicas"; - - @SerializedName(SERIALIZED_NAME_REPLICAS) + @SerializedName("replicas") private List replicas = null; - public static final String SERIALIZED_NAME_PAGINATION_LIMITED_TO = - "paginationLimitedTo"; - - @SerializedName(SERIALIZED_NAME_PAGINATION_LIMITED_TO) + @SerializedName("paginationLimitedTo") private Integer paginationLimitedTo = 1000; - public static final String SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_WORDS = - "disableTypoToleranceOnWords"; - - @SerializedName(SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_WORDS) + @SerializedName("disableTypoToleranceOnWords") private List disableTypoToleranceOnWords = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_TRANSLITERATE = - "attributesToTransliterate"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_TRANSLITERATE) + @SerializedName("attributesToTransliterate") private List attributesToTransliterate = null; - public static final String SERIALIZED_NAME_CAMEL_CASE_ATTRIBUTES = - "camelCaseAttributes"; - - @SerializedName(SERIALIZED_NAME_CAMEL_CASE_ATTRIBUTES) + @SerializedName("camelCaseAttributes") private List camelCaseAttributes = null; - public static final String SERIALIZED_NAME_DECOMPOUNDED_ATTRIBUTES = - "decompoundedAttributes"; - - @SerializedName(SERIALIZED_NAME_DECOMPOUNDED_ATTRIBUTES) + @SerializedName("decompoundedAttributes") private Map decompoundedAttributes = null; - public static final String SERIALIZED_NAME_INDEX_LANGUAGES = "indexLanguages"; - - @SerializedName(SERIALIZED_NAME_INDEX_LANGUAGES) + @SerializedName("indexLanguages") private List indexLanguages = null; - public static final String SERIALIZED_NAME_FILTER_PROMOTES = "filterPromotes"; - - @SerializedName(SERIALIZED_NAME_FILTER_PROMOTES) + @SerializedName("filterPromotes") private Boolean filterPromotes = false; - public static final String SERIALIZED_NAME_DISABLE_PREFIX_ON_ATTRIBUTES = - "disablePrefixOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_PREFIX_ON_ATTRIBUTES) + @SerializedName("disablePrefixOnAttributes") private List disablePrefixOnAttributes = null; - public static final String SERIALIZED_NAME_ALLOW_COMPRESSION_OF_INTEGER_ARRAY = - "allowCompressionOfIntegerArray"; - - @SerializedName(SERIALIZED_NAME_ALLOW_COMPRESSION_OF_INTEGER_ARRAY) + @SerializedName("allowCompressionOfIntegerArray") private Boolean allowCompressionOfIntegerArray = false; - public static final String SERIALIZED_NAME_NUMERIC_ATTRIBUTES_FOR_FILTERING = - "numericAttributesForFiltering"; - - @SerializedName(SERIALIZED_NAME_NUMERIC_ATTRIBUTES_FOR_FILTERING) + @SerializedName("numericAttributesForFiltering") private List numericAttributesForFiltering = null; - public static final String SERIALIZED_NAME_USER_DATA = "userData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) + @SerializedName("userData") private Map userData = null; - public static final String SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES = - "searchableAttributes"; - - @SerializedName(SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES) + @SerializedName("searchableAttributes") private List searchableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING = - "attributesForFaceting"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING) + @SerializedName("attributesForFaceting") private List attributesForFaceting = null; - public static final String SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES = - "unretrievableAttributes"; - - @SerializedName(SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES) + @SerializedName("unretrievableAttributes") private List unretrievableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE = - "attributesToRetrieve"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE) + @SerializedName("attributesToRetrieve") private List attributesToRetrieve = null; - public static final String SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES = - "restrictSearchableAttributes"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES) + @SerializedName("restrictSearchableAttributes") private List restrictSearchableAttributes = null; - public static final String SERIALIZED_NAME_RANKING = "ranking"; - - @SerializedName(SERIALIZED_NAME_RANKING) + @SerializedName("ranking") private List ranking = null; - public static final String SERIALIZED_NAME_CUSTOM_RANKING = "customRanking"; - - @SerializedName(SERIALIZED_NAME_CUSTOM_RANKING) + @SerializedName("customRanking") private List customRanking = null; - public static final String SERIALIZED_NAME_RELEVANCY_STRICTNESS = - "relevancyStrictness"; - - @SerializedName(SERIALIZED_NAME_RELEVANCY_STRICTNESS) + @SerializedName("relevancyStrictness") private Integer relevancyStrictness = 100; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT = - "attributesToHighlight"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT) + @SerializedName("attributesToHighlight") private List attributesToHighlight = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET = - "attributesToSnippet"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET) + @SerializedName("attributesToSnippet") private List attributesToSnippet = null; - public static final String SERIALIZED_NAME_HIGHLIGHT_PRE_TAG = - "highlightPreTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_PRE_TAG) + @SerializedName("highlightPreTag") private String highlightPreTag = ""; - public static final String SERIALIZED_NAME_HIGHLIGHT_POST_TAG = - "highlightPostTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_POST_TAG) + @SerializedName("highlightPostTag") private String highlightPostTag = ""; - public static final String SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT = - "snippetEllipsisText"; - - @SerializedName(SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT) + @SerializedName("snippetEllipsisText") private String snippetEllipsisText = "…"; - public static final String SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS = - "restrictHighlightAndSnippetArrays"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS) + @SerializedName("restrictHighlightAndSnippetArrays") private Boolean restrictHighlightAndSnippetArrays = false; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO = - "minWordSizefor1Typo"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO) + @SerializedName("minWordSizefor1Typo") private Integer minWordSizefor1Typo = 4; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS = - "minWordSizefor2Typos"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS) + @SerializedName("minWordSizefor2Typos") private Integer minWordSizefor2Typos = 8; /** Controls whether typo tolerance is enabled and how it is applied. */ @@ -239,66 +156,37 @@ public TypoToleranceEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_TYPO_TOLERANCE = "typoTolerance"; - - @SerializedName(SERIALIZED_NAME_TYPO_TOLERANCE) + @SerializedName("typoTolerance") private TypoToleranceEnum typoTolerance = TypoToleranceEnum.TRUE; - public static final String SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS = - "allowTyposOnNumericTokens"; - - @SerializedName(SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS) + @SerializedName("allowTyposOnNumericTokens") private Boolean allowTyposOnNumericTokens = true; - public static final String SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES = - "disableTypoToleranceOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES) + @SerializedName("disableTypoToleranceOnAttributes") private List disableTypoToleranceOnAttributes = null; - public static final String SERIALIZED_NAME_SEPARATORS_TO_INDEX = - "separatorsToIndex"; - - @SerializedName(SERIALIZED_NAME_SEPARATORS_TO_INDEX) + @SerializedName("separatorsToIndex") private String separatorsToIndex = ""; - public static final String SERIALIZED_NAME_IGNORE_PLURALS = "ignorePlurals"; - - @SerializedName(SERIALIZED_NAME_IGNORE_PLURALS) + @SerializedName("ignorePlurals") private String ignorePlurals = "false"; - public static final String SERIALIZED_NAME_REMOVE_STOP_WORDS = - "removeStopWords"; - - @SerializedName(SERIALIZED_NAME_REMOVE_STOP_WORDS) + @SerializedName("removeStopWords") private String removeStopWords = "false"; - public static final String SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS = - "keepDiacriticsOnCharacters"; - - @SerializedName(SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS) + @SerializedName("keepDiacriticsOnCharacters") private String keepDiacriticsOnCharacters = ""; - public static final String SERIALIZED_NAME_QUERY_LANGUAGES = "queryLanguages"; - - @SerializedName(SERIALIZED_NAME_QUERY_LANGUAGES) + @SerializedName("queryLanguages") private List queryLanguages = null; - public static final String SERIALIZED_NAME_DECOMPOUND_QUERY = - "decompoundQuery"; - - @SerializedName(SERIALIZED_NAME_DECOMPOUND_QUERY) + @SerializedName("decompoundQuery") private Boolean decompoundQuery = true; - public static final String SERIALIZED_NAME_ENABLE_RULES = "enableRules"; - - @SerializedName(SERIALIZED_NAME_ENABLE_RULES) + @SerializedName("enableRules") private Boolean enableRules = true; - public static final String SERIALIZED_NAME_ENABLE_PERSONALIZATION = - "enablePersonalization"; - - @SerializedName(SERIALIZED_NAME_ENABLE_PERSONALIZATION) + @SerializedName("enablePersonalization") private Boolean enablePersonalization = false; /** Controls if and how query words are interpreted as prefixes. */ @@ -353,9 +241,7 @@ public QueryTypeEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_QUERY_TYPE = "queryType"; - - @SerializedName(SERIALIZED_NAME_QUERY_TYPE) + @SerializedName("queryType") private QueryTypeEnum queryType = QueryTypeEnum.PREFIXLAST; /** Selects a strategy to remove words from the query when it doesn't match any hits. */ @@ -413,27 +299,17 @@ public RemoveWordsIfNoResultsEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS = - "removeWordsIfNoResults"; - - @SerializedName(SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS) + @SerializedName("removeWordsIfNoResults") private RemoveWordsIfNoResultsEnum removeWordsIfNoResults = RemoveWordsIfNoResultsEnum.NONE; - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX = "advancedSyntax"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX) + @SerializedName("advancedSyntax") private Boolean advancedSyntax = false; - public static final String SERIALIZED_NAME_OPTIONAL_WORDS = "optionalWords"; - - @SerializedName(SERIALIZED_NAME_OPTIONAL_WORDS) + @SerializedName("optionalWords") private List optionalWords = null; - public static final String SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES = - "disableExactOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES) + @SerializedName("disableExactOnAttributes") private List disableExactOnAttributes = null; /** Controls how the exact ranking criterion is computed when the query contains only one word. */ @@ -489,10 +365,7 @@ public ExactOnSingleWordQueryEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY = - "exactOnSingleWordQuery"; - - @SerializedName(SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY) + @SerializedName("exactOnSingleWordQuery") private ExactOnSingleWordQueryEnum exactOnSingleWordQuery = ExactOnSingleWordQueryEnum.ATTRIBUTE; @@ -548,10 +421,7 @@ public AlternativesAsExactEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ALTERNATIVES_AS_EXACT = - "alternativesAsExact"; - - @SerializedName(SERIALIZED_NAME_ALTERNATIVES_AS_EXACT) + @SerializedName("alternativesAsExact") private List alternativesAsExact = null; /** Gets or Sets advancedSyntaxFeatures */ @@ -605,53 +475,31 @@ public AdvancedSyntaxFeaturesEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES = - "advancedSyntaxFeatures"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES) + @SerializedName("advancedSyntaxFeatures") private List advancedSyntaxFeatures = null; - public static final String SERIALIZED_NAME_DISTINCT = "distinct"; - - @SerializedName(SERIALIZED_NAME_DISTINCT) + @SerializedName("distinct") private Integer distinct = 0; - public static final String SERIALIZED_NAME_SYNONYMS = "synonyms"; - - @SerializedName(SERIALIZED_NAME_SYNONYMS) + @SerializedName("synonyms") private Boolean synonyms = true; - public static final String SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT = - "replaceSynonymsInHighlight"; - - @SerializedName(SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT) + @SerializedName("replaceSynonymsInHighlight") private Boolean replaceSynonymsInHighlight = false; - public static final String SERIALIZED_NAME_MIN_PROXIMITY = "minProximity"; - - @SerializedName(SERIALIZED_NAME_MIN_PROXIMITY) + @SerializedName("minProximity") private Integer minProximity = 1; - public static final String SERIALIZED_NAME_RESPONSE_FIELDS = "responseFields"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_FIELDS) + @SerializedName("responseFields") private List responseFields = null; - public static final String SERIALIZED_NAME_MAX_FACET_HITS = "maxFacetHits"; - - @SerializedName(SERIALIZED_NAME_MAX_FACET_HITS) + @SerializedName("maxFacetHits") private Integer maxFacetHits = 10; - public static final String SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY = - "attributeCriteriaComputedByMinProximity"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY) + @SerializedName("attributeCriteriaComputedByMinProximity") private Boolean attributeCriteriaComputedByMinProximity = false; - public static final String SERIALIZED_NAME_RENDERING_CONTENT = - "renderingContent"; - - @SerializedName(SERIALIZED_NAME_RENDERING_CONTENT) + @SerializedName("renderingContent") private Object renderingContent = new Object(); public IndexSettings replicas(List replicas) { @@ -673,7 +521,6 @@ public IndexSettings addReplicasItem(String replicasItem) { * @return replicas */ @javax.annotation.Nullable - @ApiModelProperty(value = "Creates replicas, exact copies of an index.") public List getReplicas() { return replicas; } @@ -693,9 +540,6 @@ public IndexSettings paginationLimitedTo(Integer paginationLimitedTo) { * @return paginationLimitedTo */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Set the maximum number of hits accessible via pagination." - ) public Integer getPaginationLimitedTo() { return paginationLimitedTo; } @@ -727,9 +571,6 @@ public IndexSettings addDisableTypoToleranceOnWordsItem( * @return disableTypoToleranceOnWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A list of words for which you want to turn off typo tolerance." - ) public List getDisableTypoToleranceOnWords() { return disableTypoToleranceOnWords; } @@ -763,9 +604,6 @@ public IndexSettings addAttributesToTransliterateItem( * @return attributesToTransliterate */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Specify on which attributes to apply transliteration." - ) public List getAttributesToTransliterate() { return attributesToTransliterate; } @@ -797,9 +635,6 @@ public IndexSettings addCamelCaseAttributesItem( * @return camelCaseAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which to do a decomposition of camel case words." - ) public List getCamelCaseAttributes() { return camelCaseAttributes; } @@ -833,10 +668,6 @@ public IndexSettings putDecompoundedAttributesItem( * @return decompoundedAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Specify on which attributes in your index Algolia should apply word segmentation, also" + - " known as decompounding." - ) public Map getDecompoundedAttributes() { return decompoundedAttributes; } @@ -867,10 +698,6 @@ public IndexSettings addIndexLanguagesItem(String indexLanguagesItem) { * @return indexLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Sets the languages at the index level for language-specific processing such as" + - " tokenization and normalization." - ) public List getIndexLanguages() { return indexLanguages; } @@ -891,10 +718,6 @@ public IndexSettings filterPromotes(Boolean filterPromotes) { * @return filterPromotes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether promoted results should match the filters of the current search, except for" + - " geographic filters." - ) public Boolean getFilterPromotes() { return filterPromotes; } @@ -926,9 +749,6 @@ public IndexSettings addDisablePrefixOnAttributesItem( * @return disablePrefixOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable prefix matching." - ) public List getDisablePrefixOnAttributes() { return disablePrefixOnAttributes; } @@ -952,7 +772,6 @@ public IndexSettings allowCompressionOfIntegerArray( * @return allowCompressionOfIntegerArray */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables compression of large integer arrays.") public Boolean getAllowCompressionOfIntegerArray() { return allowCompressionOfIntegerArray; } @@ -986,9 +805,6 @@ public IndexSettings addNumericAttributesForFilteringItem( * @return numericAttributesForFiltering */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of numeric attributes that can be used as numerical filters." - ) public List getNumericAttributesForFiltering() { return numericAttributesForFiltering; } @@ -1018,7 +834,6 @@ public IndexSettings putUserDataItem(String key, Object userDataItem) { * @return userData */ @javax.annotation.Nullable - @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { return userData; } @@ -1048,9 +863,6 @@ public IndexSettings addSearchableAttributesItem( * @return searchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes used for searching." - ) public List getSearchableAttributes() { return searchableAttributes; } @@ -1082,9 +894,6 @@ public IndexSettings addAttributesForFacetingItem( * @return attributesForFaceting */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes that will be used for faceting." - ) public List getAttributesForFaceting() { return attributesForFaceting; } @@ -1116,9 +925,6 @@ public IndexSettings addUnretrievableAttributesItem( * @return unretrievableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes that can't be retrieved at query time." - ) public List getUnretrievableAttributes() { return unretrievableAttributes; } @@ -1148,9 +954,6 @@ public IndexSettings addAttributesToRetrieveItem( * @return attributesToRetrieve */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This parameter controls which attributes to retrieve and which not to retrieve." - ) public List getAttributesToRetrieve() { return attributesToRetrieve; } @@ -1182,9 +985,6 @@ public IndexSettings addRestrictSearchableAttributesItem( * @return restrictSearchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restricts a given query to look in only a subset of your searchable attributes." - ) public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; } @@ -1214,7 +1014,6 @@ public IndexSettings addRankingItem(String rankingItem) { * @return ranking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Controls how Algolia should sort your results.") public List getRanking() { return ranking; } @@ -1242,7 +1041,6 @@ public IndexSettings addCustomRankingItem(String customRankingItem) { * @return customRanking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specifies the custom ranking criterion.") public List getCustomRanking() { return customRanking; } @@ -1263,10 +1061,6 @@ public IndexSettings relevancyStrictness(Integer relevancyStrictness) { * @return relevancyStrictness */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls the relevancy threshold below which less relevant results aren't included in" + - " the results." - ) public Integer getRelevancyStrictness() { return relevancyStrictness; } @@ -1298,7 +1092,6 @@ public IndexSettings addAttributesToHighlightItem( * @return attributesToHighlight */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of attributes to highlight.") public List getAttributesToHighlight() { return attributesToHighlight; } @@ -1328,9 +1121,6 @@ public IndexSettings addAttributesToSnippetItem( * @return attributesToSnippet */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes to snippet, with an optional maximum number of words to snippet." - ) public List getAttributesToSnippet() { return attributesToSnippet; } @@ -1350,10 +1140,6 @@ public IndexSettings highlightPreTag(String highlightPreTag) { * @return highlightPreTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert before the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPreTag() { return highlightPreTag; } @@ -1373,10 +1159,6 @@ public IndexSettings highlightPostTag(String highlightPostTag) { * @return highlightPostTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert after the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPostTag() { return highlightPostTag; } @@ -1396,9 +1178,6 @@ public IndexSettings snippetEllipsisText(String snippetEllipsisText) { * @return snippetEllipsisText */ @javax.annotation.Nullable - @ApiModelProperty( - value = "String used as an ellipsis indicator when a snippet is truncated." - ) public String getSnippetEllipsisText() { return snippetEllipsisText; } @@ -1420,9 +1199,6 @@ public IndexSettings restrictHighlightAndSnippetArrays( * @return restrictHighlightAndSnippetArrays */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict highlighting and snippeting to items that matched the query." - ) public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; } @@ -1444,7 +1220,6 @@ public IndexSettings hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -1465,10 +1240,6 @@ public IndexSettings minWordSizefor1Typo(Integer minWordSizefor1Typo) { * @return minWordSizefor1Typo */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 1 typo." - ) public Integer getMinWordSizefor1Typo() { return minWordSizefor1Typo; } @@ -1489,10 +1260,6 @@ public IndexSettings minWordSizefor2Typos(Integer minWordSizefor2Typos) { * @return minWordSizefor2Typos */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 2 typos." - ) public Integer getMinWordSizefor2Typos() { return minWordSizefor2Typos; } @@ -1512,9 +1279,6 @@ public IndexSettings typoTolerance(TypoToleranceEnum typoTolerance) { * @return typoTolerance */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls whether typo tolerance is enabled and how it is applied." - ) public TypoToleranceEnum getTypoTolerance() { return typoTolerance; } @@ -1536,9 +1300,6 @@ public IndexSettings allowTyposOnNumericTokens( * @return allowTyposOnNumericTokens */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to allow typos on numbers (\"numeric tokens\") in the query string." - ) public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; } @@ -1572,9 +1333,6 @@ public IndexSettings addDisableTypoToleranceOnAttributesItem( * @return disableTypoToleranceOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable typo tolerance." - ) public List getDisableTypoToleranceOnAttributes() { return disableTypoToleranceOnAttributes; } @@ -1596,7 +1354,6 @@ public IndexSettings separatorsToIndex(String separatorsToIndex) { * @return separatorsToIndex */ @javax.annotation.Nullable - @ApiModelProperty(value = "Control which separators are indexed.") public String getSeparatorsToIndex() { return separatorsToIndex; } @@ -1616,9 +1373,6 @@ public IndexSettings ignorePlurals(String ignorePlurals) { * @return ignorePlurals */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Treats singular, plurals, and other forms of declensions as matching terms." - ) public String getIgnorePlurals() { return ignorePlurals; } @@ -1638,9 +1392,6 @@ public IndexSettings removeStopWords(String removeStopWords) { * @return removeStopWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Removes stop (common) words from the query before executing it." - ) public String getRemoveStopWords() { return removeStopWords; } @@ -1662,9 +1413,6 @@ public IndexSettings keepDiacriticsOnCharacters( * @return keepDiacriticsOnCharacters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of characters that the engine shouldn't automatically normalize." - ) public String getKeepDiacriticsOnCharacters() { return keepDiacriticsOnCharacters; } @@ -1693,10 +1441,6 @@ public IndexSettings addQueryLanguagesItem(String queryLanguagesItem) { * @return queryLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Sets the languages to be used by language-specific settings and functionalities such as" + - " ignorePlurals, removeStopWords, and CJK word-detection." - ) public List getQueryLanguages() { return queryLanguages; } @@ -1716,9 +1460,6 @@ public IndexSettings decompoundQuery(Boolean decompoundQuery) { * @return decompoundQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Splits compound words into their composing atoms in the query." - ) public Boolean getDecompoundQuery() { return decompoundQuery; } @@ -1738,7 +1479,6 @@ public IndexSettings enableRules(Boolean enableRules) { * @return enableRules */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether Rules should be globally enabled.") public Boolean getEnableRules() { return enableRules; } @@ -1758,7 +1498,6 @@ public IndexSettings enablePersonalization(Boolean enablePersonalization) { * @return enablePersonalization */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enable the Personalization feature.") public Boolean getEnablePersonalization() { return enablePersonalization; } @@ -1778,9 +1517,6 @@ public IndexSettings queryType(QueryTypeEnum queryType) { * @return queryType */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls if and how query words are interpreted as prefixes." - ) public QueryTypeEnum getQueryType() { return queryType; } @@ -1802,9 +1538,6 @@ public IndexSettings removeWordsIfNoResults( * @return removeWordsIfNoResults */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Selects a strategy to remove words from the query when it doesn't match any hits." - ) public RemoveWordsIfNoResultsEnum getRemoveWordsIfNoResults() { return removeWordsIfNoResults; } @@ -1826,7 +1559,6 @@ public IndexSettings advancedSyntax(Boolean advancedSyntax) { * @return advancedSyntax */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables the advanced query syntax.") public Boolean getAdvancedSyntax() { return advancedSyntax; } @@ -1854,9 +1586,6 @@ public IndexSettings addOptionalWordsItem(String optionalWordsItem) { * @return optionalWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A list of words that should be considered as optional when found in the query." - ) public List getOptionalWords() { return optionalWords; } @@ -1888,9 +1617,6 @@ public IndexSettings addDisableExactOnAttributesItem( * @return disableExactOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable the exact ranking criterion." - ) public List getDisableExactOnAttributes() { return disableExactOnAttributes; } @@ -1914,10 +1640,6 @@ public IndexSettings exactOnSingleWordQuery( * @return exactOnSingleWordQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls how the exact ranking criterion is computed when the query contains only one" + - " word." - ) public ExactOnSingleWordQueryEnum getExactOnSingleWordQuery() { return exactOnSingleWordQuery; } @@ -1951,10 +1673,6 @@ public IndexSettings addAlternativesAsExactItem( * @return alternativesAsExact */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of alternatives that should be considered an exact match by the exact ranking" + - " criterion." - ) public List getAlternativesAsExact() { return alternativesAsExact; } @@ -1989,10 +1707,6 @@ public IndexSettings addAdvancedSyntaxFeaturesItem( * @return advancedSyntaxFeatures */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is" + - " enabled." - ) public List getAdvancedSyntaxFeatures() { return advancedSyntaxFeatures; } @@ -2014,7 +1728,6 @@ public IndexSettings distinct(Integer distinct) { * @return distinct */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables de-duplication or grouping of results.") public Integer getDistinct() { return distinct; } @@ -2034,9 +1747,6 @@ public IndexSettings synonyms(Boolean synonyms) { * @return synonyms */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to take into account an index's synonyms for a particular search." - ) public Boolean getSynonyms() { return synonyms; } @@ -2059,10 +1769,6 @@ public IndexSettings replaceSynonymsInHighlight( * @return replaceSynonymsInHighlight */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to highlight and snippet the original word that matches the synonym or the" + - " synonym itself." - ) public Boolean getReplaceSynonymsInHighlight() { return replaceSynonymsInHighlight; } @@ -2084,7 +1790,6 @@ public IndexSettings minProximity(Integer minProximity) { * @return minProximity */ @javax.annotation.Nullable - @ApiModelProperty(value = "Precision of the proximity ranking criterion.") public Integer getMinProximity() { return minProximity; } @@ -2113,10 +1818,6 @@ public IndexSettings addResponseFieldsItem(String responseFieldsItem) { * @return responseFields */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Choose which fields to return in the API response. This parameters applies to search and" + - " browse queries." - ) public List getResponseFields() { return responseFields; } @@ -2137,10 +1838,6 @@ public IndexSettings maxFacetHits(Integer maxFacetHits) { * @return maxFacetHits */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet hits to return during a search for facet values. For performance" + - " reasons, the maximum allowed number of returned values is 100." - ) public Integer getMaxFacetHits() { return maxFacetHits; } @@ -2164,10 +1861,6 @@ public IndexSettings attributeCriteriaComputedByMinProximity( * @return attributeCriteriaComputedByMinProximity */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When attribute is ranked above proximity in your ranking formula, proximity is used to" + - " select which searchable attribute is matched in the attribute ranking stage." - ) public Boolean getAttributeCriteriaComputedByMinProximity() { return attributeCriteriaComputedByMinProximity; } @@ -2191,10 +1884,6 @@ public IndexSettings renderingContent(Object renderingContent) { * @return renderingContent */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Content defining how the search interface should be rendered. Can be set via the" + - " settings for a default value and can be overridden via rules." - ) public Object getRenderingContent() { return renderingContent; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettingsAsSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettingsAsSearchParams.java index c2c2e90f363..b848b133e3e 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettingsAsSearchParams.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/IndexSettingsAsSearchParams.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -14,103 +13,55 @@ /** IndexSettingsAsSearchParams */ public class IndexSettingsAsSearchParams { - public static final String SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES = - "searchableAttributes"; - - @SerializedName(SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES) + @SerializedName("searchableAttributes") private List searchableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING = - "attributesForFaceting"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING) + @SerializedName("attributesForFaceting") private List attributesForFaceting = null; - public static final String SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES = - "unretrievableAttributes"; - - @SerializedName(SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES) + @SerializedName("unretrievableAttributes") private List unretrievableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE = - "attributesToRetrieve"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE) + @SerializedName("attributesToRetrieve") private List attributesToRetrieve = null; - public static final String SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES = - "restrictSearchableAttributes"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES) + @SerializedName("restrictSearchableAttributes") private List restrictSearchableAttributes = null; - public static final String SERIALIZED_NAME_RANKING = "ranking"; - - @SerializedName(SERIALIZED_NAME_RANKING) + @SerializedName("ranking") private List ranking = null; - public static final String SERIALIZED_NAME_CUSTOM_RANKING = "customRanking"; - - @SerializedName(SERIALIZED_NAME_CUSTOM_RANKING) + @SerializedName("customRanking") private List customRanking = null; - public static final String SERIALIZED_NAME_RELEVANCY_STRICTNESS = - "relevancyStrictness"; - - @SerializedName(SERIALIZED_NAME_RELEVANCY_STRICTNESS) + @SerializedName("relevancyStrictness") private Integer relevancyStrictness = 100; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT = - "attributesToHighlight"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT) + @SerializedName("attributesToHighlight") private List attributesToHighlight = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET = - "attributesToSnippet"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET) + @SerializedName("attributesToSnippet") private List attributesToSnippet = null; - public static final String SERIALIZED_NAME_HIGHLIGHT_PRE_TAG = - "highlightPreTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_PRE_TAG) + @SerializedName("highlightPreTag") private String highlightPreTag = ""; - public static final String SERIALIZED_NAME_HIGHLIGHT_POST_TAG = - "highlightPostTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_POST_TAG) + @SerializedName("highlightPostTag") private String highlightPostTag = ""; - public static final String SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT = - "snippetEllipsisText"; - - @SerializedName(SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT) + @SerializedName("snippetEllipsisText") private String snippetEllipsisText = "…"; - public static final String SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS = - "restrictHighlightAndSnippetArrays"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS) + @SerializedName("restrictHighlightAndSnippetArrays") private Boolean restrictHighlightAndSnippetArrays = false; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO = - "minWordSizefor1Typo"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO) + @SerializedName("minWordSizefor1Typo") private Integer minWordSizefor1Typo = 4; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS = - "minWordSizefor2Typos"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS) + @SerializedName("minWordSizefor2Typos") private Integer minWordSizefor2Typos = 8; /** Controls whether typo tolerance is enabled and how it is applied. */ @@ -167,66 +118,37 @@ public TypoToleranceEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_TYPO_TOLERANCE = "typoTolerance"; - - @SerializedName(SERIALIZED_NAME_TYPO_TOLERANCE) + @SerializedName("typoTolerance") private TypoToleranceEnum typoTolerance = TypoToleranceEnum.TRUE; - public static final String SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS = - "allowTyposOnNumericTokens"; - - @SerializedName(SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS) + @SerializedName("allowTyposOnNumericTokens") private Boolean allowTyposOnNumericTokens = true; - public static final String SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES = - "disableTypoToleranceOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES) + @SerializedName("disableTypoToleranceOnAttributes") private List disableTypoToleranceOnAttributes = null; - public static final String SERIALIZED_NAME_SEPARATORS_TO_INDEX = - "separatorsToIndex"; - - @SerializedName(SERIALIZED_NAME_SEPARATORS_TO_INDEX) + @SerializedName("separatorsToIndex") private String separatorsToIndex = ""; - public static final String SERIALIZED_NAME_IGNORE_PLURALS = "ignorePlurals"; - - @SerializedName(SERIALIZED_NAME_IGNORE_PLURALS) + @SerializedName("ignorePlurals") private String ignorePlurals = "false"; - public static final String SERIALIZED_NAME_REMOVE_STOP_WORDS = - "removeStopWords"; - - @SerializedName(SERIALIZED_NAME_REMOVE_STOP_WORDS) + @SerializedName("removeStopWords") private String removeStopWords = "false"; - public static final String SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS = - "keepDiacriticsOnCharacters"; - - @SerializedName(SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS) + @SerializedName("keepDiacriticsOnCharacters") private String keepDiacriticsOnCharacters = ""; - public static final String SERIALIZED_NAME_QUERY_LANGUAGES = "queryLanguages"; - - @SerializedName(SERIALIZED_NAME_QUERY_LANGUAGES) + @SerializedName("queryLanguages") private List queryLanguages = null; - public static final String SERIALIZED_NAME_DECOMPOUND_QUERY = - "decompoundQuery"; - - @SerializedName(SERIALIZED_NAME_DECOMPOUND_QUERY) + @SerializedName("decompoundQuery") private Boolean decompoundQuery = true; - public static final String SERIALIZED_NAME_ENABLE_RULES = "enableRules"; - - @SerializedName(SERIALIZED_NAME_ENABLE_RULES) + @SerializedName("enableRules") private Boolean enableRules = true; - public static final String SERIALIZED_NAME_ENABLE_PERSONALIZATION = - "enablePersonalization"; - - @SerializedName(SERIALIZED_NAME_ENABLE_PERSONALIZATION) + @SerializedName("enablePersonalization") private Boolean enablePersonalization = false; /** Controls if and how query words are interpreted as prefixes. */ @@ -281,9 +203,7 @@ public QueryTypeEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_QUERY_TYPE = "queryType"; - - @SerializedName(SERIALIZED_NAME_QUERY_TYPE) + @SerializedName("queryType") private QueryTypeEnum queryType = QueryTypeEnum.PREFIXLAST; /** Selects a strategy to remove words from the query when it doesn't match any hits. */ @@ -341,27 +261,17 @@ public RemoveWordsIfNoResultsEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS = - "removeWordsIfNoResults"; - - @SerializedName(SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS) + @SerializedName("removeWordsIfNoResults") private RemoveWordsIfNoResultsEnum removeWordsIfNoResults = RemoveWordsIfNoResultsEnum.NONE; - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX = "advancedSyntax"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX) + @SerializedName("advancedSyntax") private Boolean advancedSyntax = false; - public static final String SERIALIZED_NAME_OPTIONAL_WORDS = "optionalWords"; - - @SerializedName(SERIALIZED_NAME_OPTIONAL_WORDS) + @SerializedName("optionalWords") private List optionalWords = null; - public static final String SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES = - "disableExactOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES) + @SerializedName("disableExactOnAttributes") private List disableExactOnAttributes = null; /** Controls how the exact ranking criterion is computed when the query contains only one word. */ @@ -417,10 +327,7 @@ public ExactOnSingleWordQueryEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY = - "exactOnSingleWordQuery"; - - @SerializedName(SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY) + @SerializedName("exactOnSingleWordQuery") private ExactOnSingleWordQueryEnum exactOnSingleWordQuery = ExactOnSingleWordQueryEnum.ATTRIBUTE; @@ -476,10 +383,7 @@ public AlternativesAsExactEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ALTERNATIVES_AS_EXACT = - "alternativesAsExact"; - - @SerializedName(SERIALIZED_NAME_ALTERNATIVES_AS_EXACT) + @SerializedName("alternativesAsExact") private List alternativesAsExact = null; /** Gets or Sets advancedSyntaxFeatures */ @@ -533,53 +437,31 @@ public AdvancedSyntaxFeaturesEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES = - "advancedSyntaxFeatures"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES) + @SerializedName("advancedSyntaxFeatures") private List advancedSyntaxFeatures = null; - public static final String SERIALIZED_NAME_DISTINCT = "distinct"; - - @SerializedName(SERIALIZED_NAME_DISTINCT) + @SerializedName("distinct") private Integer distinct = 0; - public static final String SERIALIZED_NAME_SYNONYMS = "synonyms"; - - @SerializedName(SERIALIZED_NAME_SYNONYMS) + @SerializedName("synonyms") private Boolean synonyms = true; - public static final String SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT = - "replaceSynonymsInHighlight"; - - @SerializedName(SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT) + @SerializedName("replaceSynonymsInHighlight") private Boolean replaceSynonymsInHighlight = false; - public static final String SERIALIZED_NAME_MIN_PROXIMITY = "minProximity"; - - @SerializedName(SERIALIZED_NAME_MIN_PROXIMITY) + @SerializedName("minProximity") private Integer minProximity = 1; - public static final String SERIALIZED_NAME_RESPONSE_FIELDS = "responseFields"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_FIELDS) + @SerializedName("responseFields") private List responseFields = null; - public static final String SERIALIZED_NAME_MAX_FACET_HITS = "maxFacetHits"; - - @SerializedName(SERIALIZED_NAME_MAX_FACET_HITS) + @SerializedName("maxFacetHits") private Integer maxFacetHits = 10; - public static final String SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY = - "attributeCriteriaComputedByMinProximity"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY) + @SerializedName("attributeCriteriaComputedByMinProximity") private Boolean attributeCriteriaComputedByMinProximity = false; - public static final String SERIALIZED_NAME_RENDERING_CONTENT = - "renderingContent"; - - @SerializedName(SERIALIZED_NAME_RENDERING_CONTENT) + @SerializedName("renderingContent") private Object renderingContent = new Object(); public IndexSettingsAsSearchParams searchableAttributes( @@ -605,9 +487,6 @@ public IndexSettingsAsSearchParams addSearchableAttributesItem( * @return searchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes used for searching." - ) public List getSearchableAttributes() { return searchableAttributes; } @@ -639,9 +518,6 @@ public IndexSettingsAsSearchParams addAttributesForFacetingItem( * @return attributesForFaceting */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes that will be used for faceting." - ) public List getAttributesForFaceting() { return attributesForFaceting; } @@ -673,9 +549,6 @@ public IndexSettingsAsSearchParams addUnretrievableAttributesItem( * @return unretrievableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes that can't be retrieved at query time." - ) public List getUnretrievableAttributes() { return unretrievableAttributes; } @@ -707,9 +580,6 @@ public IndexSettingsAsSearchParams addAttributesToRetrieveItem( * @return attributesToRetrieve */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This parameter controls which attributes to retrieve and which not to retrieve." - ) public List getAttributesToRetrieve() { return attributesToRetrieve; } @@ -741,9 +611,6 @@ public IndexSettingsAsSearchParams addRestrictSearchableAttributesItem( * @return restrictSearchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restricts a given query to look in only a subset of your searchable attributes." - ) public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; } @@ -773,7 +640,6 @@ public IndexSettingsAsSearchParams addRankingItem(String rankingItem) { * @return ranking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Controls how Algolia should sort your results.") public List getRanking() { return ranking; } @@ -803,7 +669,6 @@ public IndexSettingsAsSearchParams addCustomRankingItem( * @return customRanking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specifies the custom ranking criterion.") public List getCustomRanking() { return customRanking; } @@ -826,10 +691,6 @@ public IndexSettingsAsSearchParams relevancyStrictness( * @return relevancyStrictness */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls the relevancy threshold below which less relevant results aren't included in" + - " the results." - ) public Integer getRelevancyStrictness() { return relevancyStrictness; } @@ -861,7 +722,6 @@ public IndexSettingsAsSearchParams addAttributesToHighlightItem( * @return attributesToHighlight */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of attributes to highlight.") public List getAttributesToHighlight() { return attributesToHighlight; } @@ -893,9 +753,6 @@ public IndexSettingsAsSearchParams addAttributesToSnippetItem( * @return attributesToSnippet */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes to snippet, with an optional maximum number of words to snippet." - ) public List getAttributesToSnippet() { return attributesToSnippet; } @@ -915,10 +772,6 @@ public IndexSettingsAsSearchParams highlightPreTag(String highlightPreTag) { * @return highlightPreTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert before the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPreTag() { return highlightPreTag; } @@ -938,10 +791,6 @@ public IndexSettingsAsSearchParams highlightPostTag(String highlightPostTag) { * @return highlightPostTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert after the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPostTag() { return highlightPostTag; } @@ -963,9 +812,6 @@ public IndexSettingsAsSearchParams snippetEllipsisText( * @return snippetEllipsisText */ @javax.annotation.Nullable - @ApiModelProperty( - value = "String used as an ellipsis indicator when a snippet is truncated." - ) public String getSnippetEllipsisText() { return snippetEllipsisText; } @@ -987,9 +833,6 @@ public IndexSettingsAsSearchParams restrictHighlightAndSnippetArrays( * @return restrictHighlightAndSnippetArrays */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict highlighting and snippeting to items that matched the query." - ) public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; } @@ -1011,7 +854,6 @@ public IndexSettingsAsSearchParams hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -1034,10 +876,6 @@ public IndexSettingsAsSearchParams minWordSizefor1Typo( * @return minWordSizefor1Typo */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 1 typo." - ) public Integer getMinWordSizefor1Typo() { return minWordSizefor1Typo; } @@ -1060,10 +898,6 @@ public IndexSettingsAsSearchParams minWordSizefor2Typos( * @return minWordSizefor2Typos */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 2 typos." - ) public Integer getMinWordSizefor2Typos() { return minWordSizefor2Typos; } @@ -1085,9 +919,6 @@ public IndexSettingsAsSearchParams typoTolerance( * @return typoTolerance */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls whether typo tolerance is enabled and how it is applied." - ) public TypoToleranceEnum getTypoTolerance() { return typoTolerance; } @@ -1109,9 +940,6 @@ public IndexSettingsAsSearchParams allowTyposOnNumericTokens( * @return allowTyposOnNumericTokens */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to allow typos on numbers (\"numeric tokens\") in the query string." - ) public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; } @@ -1145,9 +973,6 @@ public IndexSettingsAsSearchParams addDisableTypoToleranceOnAttributesItem( * @return disableTypoToleranceOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable typo tolerance." - ) public List getDisableTypoToleranceOnAttributes() { return disableTypoToleranceOnAttributes; } @@ -1171,7 +996,6 @@ public IndexSettingsAsSearchParams separatorsToIndex( * @return separatorsToIndex */ @javax.annotation.Nullable - @ApiModelProperty(value = "Control which separators are indexed.") public String getSeparatorsToIndex() { return separatorsToIndex; } @@ -1191,9 +1015,6 @@ public IndexSettingsAsSearchParams ignorePlurals(String ignorePlurals) { * @return ignorePlurals */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Treats singular, plurals, and other forms of declensions as matching terms." - ) public String getIgnorePlurals() { return ignorePlurals; } @@ -1213,9 +1034,6 @@ public IndexSettingsAsSearchParams removeStopWords(String removeStopWords) { * @return removeStopWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Removes stop (common) words from the query before executing it." - ) public String getRemoveStopWords() { return removeStopWords; } @@ -1237,9 +1055,6 @@ public IndexSettingsAsSearchParams keepDiacriticsOnCharacters( * @return keepDiacriticsOnCharacters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of characters that the engine shouldn't automatically normalize." - ) public String getKeepDiacriticsOnCharacters() { return keepDiacriticsOnCharacters; } @@ -1272,10 +1087,6 @@ public IndexSettingsAsSearchParams addQueryLanguagesItem( * @return queryLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Sets the languages to be used by language-specific settings and functionalities such as" + - " ignorePlurals, removeStopWords, and CJK word-detection." - ) public List getQueryLanguages() { return queryLanguages; } @@ -1295,9 +1106,6 @@ public IndexSettingsAsSearchParams decompoundQuery(Boolean decompoundQuery) { * @return decompoundQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Splits compound words into their composing atoms in the query." - ) public Boolean getDecompoundQuery() { return decompoundQuery; } @@ -1317,7 +1125,6 @@ public IndexSettingsAsSearchParams enableRules(Boolean enableRules) { * @return enableRules */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether Rules should be globally enabled.") public Boolean getEnableRules() { return enableRules; } @@ -1339,7 +1146,6 @@ public IndexSettingsAsSearchParams enablePersonalization( * @return enablePersonalization */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enable the Personalization feature.") public Boolean getEnablePersonalization() { return enablePersonalization; } @@ -1359,9 +1165,6 @@ public IndexSettingsAsSearchParams queryType(QueryTypeEnum queryType) { * @return queryType */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls if and how query words are interpreted as prefixes." - ) public QueryTypeEnum getQueryType() { return queryType; } @@ -1383,9 +1186,6 @@ public IndexSettingsAsSearchParams removeWordsIfNoResults( * @return removeWordsIfNoResults */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Selects a strategy to remove words from the query when it doesn't match any hits." - ) public RemoveWordsIfNoResultsEnum getRemoveWordsIfNoResults() { return removeWordsIfNoResults; } @@ -1407,7 +1207,6 @@ public IndexSettingsAsSearchParams advancedSyntax(Boolean advancedSyntax) { * @return advancedSyntax */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables the advanced query syntax.") public Boolean getAdvancedSyntax() { return advancedSyntax; } @@ -1437,9 +1236,6 @@ public IndexSettingsAsSearchParams addOptionalWordsItem( * @return optionalWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A list of words that should be considered as optional when found in the query." - ) public List getOptionalWords() { return optionalWords; } @@ -1471,9 +1267,6 @@ public IndexSettingsAsSearchParams addDisableExactOnAttributesItem( * @return disableExactOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable the exact ranking criterion." - ) public List getDisableExactOnAttributes() { return disableExactOnAttributes; } @@ -1497,10 +1290,6 @@ public IndexSettingsAsSearchParams exactOnSingleWordQuery( * @return exactOnSingleWordQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls how the exact ranking criterion is computed when the query contains only one" + - " word." - ) public ExactOnSingleWordQueryEnum getExactOnSingleWordQuery() { return exactOnSingleWordQuery; } @@ -1534,10 +1323,6 @@ public IndexSettingsAsSearchParams addAlternativesAsExactItem( * @return alternativesAsExact */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of alternatives that should be considered an exact match by the exact ranking" + - " criterion." - ) public List getAlternativesAsExact() { return alternativesAsExact; } @@ -1572,10 +1357,6 @@ public IndexSettingsAsSearchParams addAdvancedSyntaxFeaturesItem( * @return advancedSyntaxFeatures */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is" + - " enabled." - ) public List getAdvancedSyntaxFeatures() { return advancedSyntaxFeatures; } @@ -1597,7 +1378,6 @@ public IndexSettingsAsSearchParams distinct(Integer distinct) { * @return distinct */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables de-duplication or grouping of results.") public Integer getDistinct() { return distinct; } @@ -1617,9 +1397,6 @@ public IndexSettingsAsSearchParams synonyms(Boolean synonyms) { * @return synonyms */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to take into account an index's synonyms for a particular search." - ) public Boolean getSynonyms() { return synonyms; } @@ -1642,10 +1419,6 @@ public IndexSettingsAsSearchParams replaceSynonymsInHighlight( * @return replaceSynonymsInHighlight */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to highlight and snippet the original word that matches the synonym or the" + - " synonym itself." - ) public Boolean getReplaceSynonymsInHighlight() { return replaceSynonymsInHighlight; } @@ -1667,7 +1440,6 @@ public IndexSettingsAsSearchParams minProximity(Integer minProximity) { * @return minProximity */ @javax.annotation.Nullable - @ApiModelProperty(value = "Precision of the proximity ranking criterion.") public Integer getMinProximity() { return minProximity; } @@ -1700,10 +1472,6 @@ public IndexSettingsAsSearchParams addResponseFieldsItem( * @return responseFields */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Choose which fields to return in the API response. This parameters applies to search and" + - " browse queries." - ) public List getResponseFields() { return responseFields; } @@ -1724,10 +1492,6 @@ public IndexSettingsAsSearchParams maxFacetHits(Integer maxFacetHits) { * @return maxFacetHits */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet hits to return during a search for facet values. For performance" + - " reasons, the maximum allowed number of returned values is 100." - ) public Integer getMaxFacetHits() { return maxFacetHits; } @@ -1751,10 +1515,6 @@ public IndexSettingsAsSearchParams attributeCriteriaComputedByMinProximity( * @return attributeCriteriaComputedByMinProximity */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When attribute is ranked above proximity in your ranking formula, proximity is used to" + - " select which searchable attribute is matched in the attribute ranking stage." - ) public Boolean getAttributeCriteriaComputedByMinProximity() { return attributeCriteriaComputedByMinProximity; } @@ -1778,10 +1538,6 @@ public IndexSettingsAsSearchParams renderingContent(Object renderingContent) { * @return renderingContent */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Content defining how the search interface should be rendered. Can be set via the" + - " settings for a default value and can be overridden via rules." - ) public Object getRenderingContent() { return renderingContent; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/KeyObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/KeyObject.java index 465c39dc574..e86970b8d1d 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/KeyObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/KeyObject.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -86,52 +85,31 @@ public AclEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_ACL = "acl"; - - @SerializedName(SERIALIZED_NAME_ACL) + @SerializedName("acl") private List acl = new ArrayList<>(); - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @SerializedName("description") private String description = ""; - public static final String SERIALIZED_NAME_INDEXES = "indexes"; - - @SerializedName(SERIALIZED_NAME_INDEXES) + @SerializedName("indexes") private List indexes = null; - public static final String SERIALIZED_NAME_MAX_HITS_PER_QUERY = - "maxHitsPerQuery"; - - @SerializedName(SERIALIZED_NAME_MAX_HITS_PER_QUERY) + @SerializedName("maxHitsPerQuery") private Integer maxHitsPerQuery = 0; - public static final String SERIALIZED_NAME_MAX_QUERIES_PER_I_P_PER_HOUR = - "maxQueriesPerIPPerHour"; - - @SerializedName(SERIALIZED_NAME_MAX_QUERIES_PER_I_P_PER_HOUR) + @SerializedName("maxQueriesPerIPPerHour") private Integer maxQueriesPerIPPerHour = 0; - public static final String SERIALIZED_NAME_QUERY_PARAMETERS = - "queryParameters"; - - @SerializedName(SERIALIZED_NAME_QUERY_PARAMETERS) + @SerializedName("queryParameters") private String queryParameters = ""; - public static final String SERIALIZED_NAME_REFERERS = "referers"; - - @SerializedName(SERIALIZED_NAME_REFERERS) + @SerializedName("referers") private List referers = null; - public static final String SERIALIZED_NAME_VALIDITY = "validity"; - - @SerializedName(SERIALIZED_NAME_VALIDITY) + @SerializedName("validity") private Integer validity = 0; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - - @SerializedName(SERIALIZED_NAME_CREATED_AT) + @SerializedName("createdAt") private OffsetDateTime createdAt; public KeyObject acl(List acl) { @@ -150,10 +128,6 @@ public KeyObject addAclItem(AclEnum aclItem) { * @return acl */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Set of permissions associated with the key." - ) public List getAcl() { return acl; } @@ -174,10 +148,6 @@ public KeyObject description(String description) { * @return description */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A comment used to identify a key more easily in the dashboard. It is not interpreted by" + - " the API." - ) public String getDescription() { return description; } @@ -206,10 +176,6 @@ public KeyObject addIndexesItem(String indexesItem) { * @return indexes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict this new API key to a list of indices or index patterns. If the list is empty," + - " all indices are allowed." - ) public List getIndexes() { return indexes; } @@ -229,10 +195,6 @@ public KeyObject maxHitsPerQuery(Integer maxHitsPerQuery) { * @return maxHitsPerQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of hits this API key can retrieve in one query. If zero, no limit is" + - " enforced." - ) public Integer getMaxHitsPerQuery() { return maxHitsPerQuery; } @@ -252,9 +214,6 @@ public KeyObject maxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { * @return maxQueriesPerIPPerHour */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of API calls per hour allowed from a given IP address or a user token." - ) public Integer getMaxQueriesPerIPPerHour() { return maxQueriesPerIPPerHour; } @@ -275,10 +234,6 @@ public KeyObject queryParameters(String queryParameters) { * @return queryParameters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "URL-encoded query string. Force some query parameters to be applied for each query made" + - " with this API key." - ) public String getQueryParameters() { return queryParameters; } @@ -306,10 +261,6 @@ public KeyObject addReferersItem(String referersItem) { * @return referers */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict this new API key to specific referers. If empty or blank, defaults to all" + - " referers." - ) public List getReferers() { return referers; } @@ -330,10 +281,6 @@ public KeyObject validity(Integer validity) { * @return validity */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Validity limit for this key in seconds. The key will automatically be removed after this" + - " period of time." - ) public Integer getValidity() { return validity; } @@ -353,10 +300,6 @@ public KeyObject createdAt(OffsetDateTime createdAt) { * @return createdAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of creation (ISO-8601 format)." - ) public OffsetDateTime getCreatedAt() { return createdAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Languages.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Languages.java index 85dc1620a6a..584101dfbfd 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Languages.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Languages.java @@ -1,27 +1,18 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** A dictionary language. */ -@ApiModel(description = "A dictionary language.") public class Languages { - public static final String SERIALIZED_NAME_PLURALS = "plurals"; - - @SerializedName(SERIALIZED_NAME_PLURALS) + @SerializedName("plurals") private DictionaryLanguage plurals; - public static final String SERIALIZED_NAME_STOPWORDS = "stopwords"; - - @SerializedName(SERIALIZED_NAME_STOPWORDS) + @SerializedName("stopwords") private DictionaryLanguage stopwords; - public static final String SERIALIZED_NAME_COMPOUNDS = "compounds"; - - @SerializedName(SERIALIZED_NAME_COMPOUNDS) + @SerializedName("compounds") private DictionaryLanguage compounds; public Languages plurals(DictionaryLanguage plurals) { @@ -35,7 +26,6 @@ public Languages plurals(DictionaryLanguage plurals) { * @return plurals */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") public DictionaryLanguage getPlurals() { return plurals; } @@ -55,7 +45,6 @@ public Languages stopwords(DictionaryLanguage stopwords) { * @return stopwords */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") public DictionaryLanguage getStopwords() { return stopwords; } @@ -75,7 +64,6 @@ public Languages compounds(DictionaryLanguage compounds) { * @return compounds */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") public DictionaryLanguage getCompounds() { return compounds; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java index c13fa9b9f20..891fb52a7f5 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,9 +8,7 @@ /** ListApiKeysResponse */ public class ListApiKeysResponse { - public static final String SERIALIZED_NAME_KEYS = "keys"; - - @SerializedName(SERIALIZED_NAME_KEYS) + @SerializedName("keys") private List keys = new ArrayList<>(); public ListApiKeysResponse keys(List keys) { @@ -30,7 +27,6 @@ public ListApiKeysResponse addKeysItem(KeyObject keysItem) { * @return keys */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "List of api keys.") public List getKeys() { return keys; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListClustersResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListClustersResponse.java index 5794a2f7955..f9a9bdc597d 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListClustersResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListClustersResponse.java @@ -1,19 +1,14 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Array of clusters. */ -@ApiModel(description = "Array of clusters.") public class ListClustersResponse { - public static final String SERIALIZED_NAME_TOP_USERS = "topUsers"; - - @SerializedName(SERIALIZED_NAME_TOP_USERS) + @SerializedName("topUsers") private List topUsers = new ArrayList<>(); public ListClustersResponse topUsers(List topUsers) { @@ -32,10 +27,6 @@ public ListClustersResponse addTopUsersItem(String topUsersItem) { * @return topUsers */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Mapping of cluster names to top users." - ) public List getTopUsers() { return topUsers; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java index 201e4d3634d..6ac495195b6 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,14 +8,10 @@ /** ListIndicesResponse */ public class ListIndicesResponse { - public static final String SERIALIZED_NAME_ITEMS = "items"; - - @SerializedName(SERIALIZED_NAME_ITEMS) + @SerializedName("items") private List items = null; - public static final String SERIALIZED_NAME_NB_PAGES = "nbPages"; - - @SerializedName(SERIALIZED_NAME_NB_PAGES) + @SerializedName("nbPages") private Integer nbPages; public ListIndicesResponse items(List items) { @@ -38,7 +33,6 @@ public ListIndicesResponse addItemsItem(Index itemsItem) { * @return items */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of the fetched indices.") public List getItems() { return items; } @@ -58,7 +52,6 @@ public ListIndicesResponse nbPages(Integer nbPages) { * @return nbPages */ @javax.annotation.Nullable - @ApiModelProperty(example = "100", value = "Number of pages.") public Integer getNbPages() { return nbPages; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListUserIdsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListUserIdsResponse.java index 0ba70e52e29..8da966a1fe9 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListUserIdsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListUserIdsResponse.java @@ -1,19 +1,14 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** UserIDs data. */ -@ApiModel(description = "UserIDs data.") public class ListUserIdsResponse { - public static final String SERIALIZED_NAME_USER_I_DS = "userIDs"; - - @SerializedName(SERIALIZED_NAME_USER_I_DS) + @SerializedName("userIDs") private List userIDs = new ArrayList<>(); public ListUserIdsResponse userIDs(List userIDs) { @@ -32,7 +27,6 @@ public ListUserIdsResponse addUserIDsItem(UserId userIDsItem) { * @return userIDs */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "List of userIDs.") public List getUserIDs() { return userIDs; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleBatchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleBatchResponse.java index 8ae8cea12ea..e9068d62db9 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleBatchResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleBatchResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -11,14 +10,10 @@ /** MultipleBatchResponse */ public class MultipleBatchResponse { - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Map taskID = null; - public static final String SERIALIZED_NAME_OBJECT_I_DS = "objectIDs"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_DS) + @SerializedName("objectIDs") private List objectIDs = null; public MultipleBatchResponse taskID(Map taskID) { @@ -40,7 +35,6 @@ public MultipleBatchResponse putTaskIDItem(String key, Object taskIDItem) { * @return taskID */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of tasksIDs per index.") public Map getTaskID() { return taskID; } @@ -68,7 +62,6 @@ public MultipleBatchResponse addObjectIDsItem(String objectIDsItem) { * @return objectIDs */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of objectID.") public List getObjectIDs() { return objectIDs; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsObject.java index fcadea62fd3..38036f35eef 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsObject.java @@ -1,30 +1,20 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** GetObject operation on an index. */ -@ApiModel(description = "GetObject operation on an index.") public class MultipleGetObjectsObject { - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE = - "attributesToRetrieve"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE) + @SerializedName("attributesToRetrieve") private List attributesToRetrieve = null; - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; - public static final String SERIALIZED_NAME_INDEX_NAME = "indexName"; - - @SerializedName(SERIALIZED_NAME_INDEX_NAME) + @SerializedName("indexName") private String indexName; public MultipleGetObjectsObject attributesToRetrieve( @@ -50,9 +40,6 @@ public MultipleGetObjectsObject addAttributesToRetrieveItem( * @return attributesToRetrieve */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes to retrieve. By default, all retrievable attributes are returned." - ) public List getAttributesToRetrieve() { return attributesToRetrieve; } @@ -72,10 +59,6 @@ public MultipleGetObjectsObject objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "ID of the object within that index." - ) public String getObjectID() { return objectID; } @@ -95,10 +78,6 @@ public MultipleGetObjectsObject indexName(String indexName) { * @return indexName */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "name of the index containing the object." - ) public String getIndexName() { return indexName; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueries.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueries.java index f7cd5d23f09..b4cfd6b433c 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueries.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueries.java @@ -5,21 +5,16 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.Objects; /** MultipleQueries */ public class MultipleQueries { - public static final String SERIALIZED_NAME_INDEX_NAME = "indexName"; - - @SerializedName(SERIALIZED_NAME_INDEX_NAME) + @SerializedName("indexName") private String indexName; - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; /** Perform a search query with `default`, will search for facet values if `facet` is given. */ @@ -71,19 +66,13 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) + @SerializedName("type") private TypeEnum type = TypeEnum.DEFAULT; - public static final String SERIALIZED_NAME_FACET = "facet"; - - @SerializedName(SERIALIZED_NAME_FACET) + @SerializedName("facet") private String facet; - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params; public MultipleQueries indexName(String indexName) { @@ -97,11 +86,6 @@ public MultipleQueries indexName(String indexName) { * @return indexName */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "products", - required = true, - value = "The Algolia index name." - ) public String getIndexName() { return indexName; } @@ -121,7 +105,6 @@ public MultipleQueries query(String query) { * @return query */ @javax.annotation.Nullable - @ApiModelProperty(value = "The text to search in the index.") public String getQuery() { return query; } @@ -141,10 +124,6 @@ public MultipleQueries type(TypeEnum type) { * @return type */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Perform a search query with `default`, will search for facet values if `facet` is" + - " given." - ) public TypeEnum getType() { return type; } @@ -164,7 +143,6 @@ public MultipleQueries facet(String facet) { * @return facet */ @javax.annotation.Nullable - @ApiModelProperty(value = "The `facet` name.") public String getFacet() { return facet; } @@ -184,7 +162,6 @@ public MultipleQueries params(String params) { * @return params */ @javax.annotation.Nullable - @ApiModelProperty(value = "A query string of search parameters.") public String getParams() { return params; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesObject.java index f799ac1ac0f..bd519005404 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesObject.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -14,9 +13,7 @@ /** MultipleQueriesObject */ public class MultipleQueriesObject { - public static final String SERIALIZED_NAME_REQUESTS = "requests"; - - @SerializedName(SERIALIZED_NAME_REQUESTS) + @SerializedName("requests") private List requests = new ArrayList<>(); /** Gets or Sets strategy */ @@ -68,9 +65,7 @@ public StrategyEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_STRATEGY = "strategy"; - - @SerializedName(SERIALIZED_NAME_STRATEGY) + @SerializedName("strategy") private StrategyEnum strategy; public MultipleQueriesObject requests(List requests) { @@ -89,7 +84,6 @@ public MultipleQueriesObject addRequestsItem(MultipleQueries requestsItem) { * @return requests */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public List getRequests() { return requests; } @@ -109,7 +103,6 @@ public MultipleQueriesObject strategy(StrategyEnum strategy) { * @return strategy */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public StrategyEnum getStrategy() { return strategy; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesResponse.java index c9818f862b3..7b10d4ac69e 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,9 +8,7 @@ /** MultipleQueriesResponse */ public class MultipleQueriesResponse { - public static final String SERIALIZED_NAME_RESULTS = "results"; - - @SerializedName(SERIALIZED_NAME_RESULTS) + @SerializedName("results") private List results = null; public MultipleQueriesResponse results(List results) { @@ -33,7 +30,6 @@ public MultipleQueriesResponse addResultsItem(SearchResponse resultsItem) { * @return results */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getResults() { return results; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Operation.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Operation.java index 7831509fda1..7aab359949d 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Operation.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Operation.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -9,19 +8,13 @@ /** Operation */ public class Operation { - public static final String SERIALIZED_NAME_ACTION = "action"; - - @SerializedName(SERIALIZED_NAME_ACTION) + @SerializedName("action") private Action action; - public static final String SERIALIZED_NAME_BODY = "body"; - - @SerializedName(SERIALIZED_NAME_BODY) + @SerializedName("body") private Map body = null; - public static final String SERIALIZED_NAME_INDEX_NAME = "indexName"; - - @SerializedName(SERIALIZED_NAME_INDEX_NAME) + @SerializedName("indexName") private String indexName; public Operation action(Action action) { @@ -35,7 +28,6 @@ public Operation action(Action action) { * @return action */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Action getAction() { return action; } @@ -63,9 +55,6 @@ public Operation putBodyItem(String key, Object bodyItem) { * @return body */ @javax.annotation.Nullable - @ApiModelProperty( - value = "arguments to the operation (depends on the type of the operation)." - ) public Map getBody() { return body; } @@ -85,7 +74,6 @@ public Operation indexName(String indexName) { * @return indexName */ @javax.annotation.Nullable - @ApiModelProperty(value = "Index to target for this operation.") public String getIndexName() { return indexName; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexObject.java index c7bc64aa54d..da459c53529 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexObject.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -64,14 +63,10 @@ public OperationEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_OPERATION = "operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) + @SerializedName("operation") private OperationEnum operation; - public static final String SERIALIZED_NAME_DESTINATION = "destination"; - - @SerializedName(SERIALIZED_NAME_DESTINATION) + @SerializedName("destination") private String destination; /** Gets or Sets scope */ @@ -125,9 +120,7 @@ public ScopeEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_SCOPE = "scope"; - - @SerializedName(SERIALIZED_NAME_SCOPE) + @SerializedName("scope") private List scope = null; public OperationIndexObject operation(OperationEnum operation) { @@ -141,10 +134,6 @@ public OperationIndexObject operation(OperationEnum operation) { * @return operation */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Type of operation to perform (move or copy)." - ) public OperationEnum getOperation() { return operation; } @@ -164,11 +153,6 @@ public OperationIndexObject destination(String destination) { * @return destination */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "products", - required = true, - value = "The Algolia index name." - ) public String getDestination() { return destination; } @@ -197,10 +181,6 @@ public OperationIndexObject addScopeItem(ScopeEnum scopeItem) { * @return scope */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Scope of the data to copy. When absent, a full copy is performed. When present, only the" + - " selected scopes are copied." - ) public List getScope() { return scope; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Params.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Params.java index c54cf91ea9a..9ff52121fe5 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Params.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Params.java @@ -1,33 +1,20 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Additional search parameters. Any valid search parameter is allowed. */ -@ApiModel( - description = "Additional search parameters. Any valid search parameter is allowed." -) public class Params { - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query; - public static final String SERIALIZED_NAME_AUTOMATIC_FACET_FILTERS = - "automaticFacetFilters"; - - @SerializedName(SERIALIZED_NAME_AUTOMATIC_FACET_FILTERS) + @SerializedName("automaticFacetFilters") private List automaticFacetFilters = null; - public static final String SERIALIZED_NAME_AUTOMATIC_OPTIONAL_FACET_FILTERS = - "automaticOptionalFacetFilters"; - - @SerializedName(SERIALIZED_NAME_AUTOMATIC_OPTIONAL_FACET_FILTERS) + @SerializedName("automaticOptionalFacetFilters") private List automaticOptionalFacetFilters = null; public Params query(String query) { @@ -41,7 +28,6 @@ public Params query(String query) { * @return query */ @javax.annotation.Nullable - @ApiModelProperty(value = "Query string.") public String getQuery() { return query; } @@ -74,10 +60,6 @@ public Params addAutomaticFacetFiltersItem( * @return automaticFacetFilters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Names of facets to which automatic filtering must be applied; they must match the facet" + - " name of a facet value placeholder in the query pattern." - ) public List getAutomaticFacetFilters() { return automaticFacetFilters; } @@ -111,9 +93,6 @@ public Params addAutomaticOptionalFacetFiltersItem( * @return automaticOptionalFacetFilters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Same syntax as automaticFacetFilters, but the engine treats the filters as optional." - ) public List getAutomaticOptionalFacetFilters() { return automaticOptionalFacetFilters; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Promote.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Promote.java index 21d308d9084..2ce9a59139b 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Promote.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Promote.java @@ -1,29 +1,20 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Object to promote as hits. */ -@ApiModel(description = "Object to promote as hits.") public class Promote { - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; - public static final String SERIALIZED_NAME_OBJECT_I_DS = "objectIDs"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_DS) + @SerializedName("objectIDs") private List objectIDs = null; - public static final String SERIALIZED_NAME_POSITION = "position"; - - @SerializedName(SERIALIZED_NAME_POSITION) + @SerializedName("position") private Integer position; public Promote objectID(String objectID) { @@ -37,7 +28,6 @@ public Promote objectID(String objectID) { * @return objectID */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unique identifier of the object to promote.") public String getObjectID() { return objectID; } @@ -65,9 +55,6 @@ public Promote addObjectIDsItem(String objectIDsItem) { * @return objectIDs */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Array of unique identifiers of the objects to promote." - ) public List getObjectIDs() { return objectIDs; } @@ -89,12 +76,6 @@ public Promote position(Integer position) { * @return position */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "The position to promote the objects to (zero-based). If you pass objectIDs, the objects" + - " are placed at this position as a group. For example, if you pass four objectIDs" + - " to position 0, the objects take the first four positions." - ) public Integer getPosition() { return position; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfo.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfo.java index ca84786ff7f..c6c236cdf3f 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfo.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfo.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -9,62 +8,37 @@ /** RankingInfo */ public class RankingInfo { - public static final String SERIALIZED_NAME_FILTERS = "filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) + @SerializedName("filters") private Integer filters; - public static final String SERIALIZED_NAME_FIRST_MATCHED_WORD = - "firstMatchedWord"; - - @SerializedName(SERIALIZED_NAME_FIRST_MATCHED_WORD) + @SerializedName("firstMatchedWord") private Integer firstMatchedWord; - public static final String SERIALIZED_NAME_GEO_DISTANCE = "geoDistance"; - - @SerializedName(SERIALIZED_NAME_GEO_DISTANCE) + @SerializedName("geoDistance") private Integer geoDistance; - public static final String SERIALIZED_NAME_GEO_PRECISION = "geoPrecision"; - - @SerializedName(SERIALIZED_NAME_GEO_PRECISION) + @SerializedName("geoPrecision") private Integer geoPrecision; - public static final String SERIALIZED_NAME_MATCHED_GEO_LOCATION = - "matchedGeoLocation"; - - @SerializedName(SERIALIZED_NAME_MATCHED_GEO_LOCATION) + @SerializedName("matchedGeoLocation") private Map matchedGeoLocation = null; - public static final String SERIALIZED_NAME_NB_EXACT_WORDS = "nbExactWords"; - - @SerializedName(SERIALIZED_NAME_NB_EXACT_WORDS) + @SerializedName("nbExactWords") private Integer nbExactWords; - public static final String SERIALIZED_NAME_NB_TYPOS = "nbTypos"; - - @SerializedName(SERIALIZED_NAME_NB_TYPOS) + @SerializedName("nbTypos") private Integer nbTypos; - public static final String SERIALIZED_NAME_PROMOTED = "promoted"; - - @SerializedName(SERIALIZED_NAME_PROMOTED) + @SerializedName("promoted") private Boolean promoted; - public static final String SERIALIZED_NAME_PROXIMITY_DISTANCE = - "proximityDistance"; - - @SerializedName(SERIALIZED_NAME_PROXIMITY_DISTANCE) + @SerializedName("proximityDistance") private Integer proximityDistance; - public static final String SERIALIZED_NAME_USER_SCORE = "userScore"; - - @SerializedName(SERIALIZED_NAME_USER_SCORE) + @SerializedName("userScore") private Integer userScore; - public static final String SERIALIZED_NAME_WORD = "word"; - - @SerializedName(SERIALIZED_NAME_WORD) + @SerializedName("word") private Integer word; public RankingInfo filters(Integer filters) { @@ -78,7 +52,6 @@ public RankingInfo filters(Integer filters) { * @return filters */ @javax.annotation.Nullable - @ApiModelProperty(value = "This field is reserved for advanced usage.") public Integer getFilters() { return filters; } @@ -98,9 +71,6 @@ public RankingInfo firstMatchedWord(Integer firstMatchedWord) { * @return firstMatchedWord */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Position of the most important matched attribute in the attributes to index list." - ) public Integer getFirstMatchedWord() { return firstMatchedWord; } @@ -121,10 +91,6 @@ public RankingInfo geoDistance(Integer geoDistance) { * @return geoDistance */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Distance between the geo location in the search query and the best matching geo location" + - " in the record, divided by the geo precision (in meters)." - ) public Integer getGeoDistance() { return geoDistance; } @@ -144,9 +110,6 @@ public RankingInfo geoPrecision(Integer geoPrecision) { * @return geoPrecision */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Precision used when computing the geo distance, in meters." - ) public Integer getGeoPrecision() { return geoPrecision; } @@ -179,7 +142,6 @@ public RankingInfo putMatchedGeoLocationItem( * @return matchedGeoLocation */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Map getMatchedGeoLocation() { return matchedGeoLocation; } @@ -201,7 +163,6 @@ public RankingInfo nbExactWords(Integer nbExactWords) { * @return nbExactWords */ @javax.annotation.Nullable - @ApiModelProperty(value = "Number of exactly matched words.") public Integer getNbExactWords() { return nbExactWords; } @@ -221,9 +182,6 @@ public RankingInfo nbTypos(Integer nbTypos) { * @return nbTypos */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Number of typos encountered when matching the record." - ) public Integer getNbTypos() { return nbTypos; } @@ -243,9 +201,6 @@ public RankingInfo promoted(Boolean promoted) { * @return promoted */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Present and set to true if a Rule promoted the hit." - ) public Boolean getPromoted() { return promoted; } @@ -266,10 +221,6 @@ public RankingInfo proximityDistance(Integer proximityDistance) { * @return proximityDistance */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When the query contains more than one word, the sum of the distances between matched" + - " words (in meters)." - ) public Integer getProximityDistance() { return proximityDistance; } @@ -289,9 +240,6 @@ public RankingInfo userScore(Integer userScore) { * @return userScore */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Custom ranking for the object, expressed as a single integer value." - ) public Integer getUserScore() { return userScore; } @@ -311,9 +259,6 @@ public RankingInfo word(Integer word) { * @return word */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Number of matched words, including prefixes and typos." - ) public Integer getWord() { return word; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfoMatchedGeoLocation.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfoMatchedGeoLocation.java index 9007f515dc4..6ea7de27a82 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfoMatchedGeoLocation.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RankingInfoMatchedGeoLocation.java @@ -1,25 +1,18 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** RankingInfoMatchedGeoLocation */ public class RankingInfoMatchedGeoLocation { - public static final String SERIALIZED_NAME_LAT = "lat"; - - @SerializedName(SERIALIZED_NAME_LAT) + @SerializedName("lat") private Double lat; - public static final String SERIALIZED_NAME_LNG = "lng"; - - @SerializedName(SERIALIZED_NAME_LNG) + @SerializedName("lng") private Double lng; - public static final String SERIALIZED_NAME_DISTANCE = "distance"; - - @SerializedName(SERIALIZED_NAME_DISTANCE) + @SerializedName("distance") private Integer distance; public RankingInfoMatchedGeoLocation lat(Double lat) { @@ -33,7 +26,6 @@ public RankingInfoMatchedGeoLocation lat(Double lat) { * @return lat */ @javax.annotation.Nullable - @ApiModelProperty(value = "Latitude of the matched location.") public Double getLat() { return lat; } @@ -53,7 +45,6 @@ public RankingInfoMatchedGeoLocation lng(Double lng) { * @return lng */ @javax.annotation.Nullable - @ApiModelProperty(value = "Longitude of the matched location.") public Double getLng() { return lng; } @@ -73,9 +64,6 @@ public RankingInfoMatchedGeoLocation distance(Integer distance) { * @return distance */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Distance between the matched location and the search location (in meters)." - ) public Integer getDistance() { return distance; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Record.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Record.java index c077f4165f5..e8519379cf1 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Record.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Record.java @@ -1,40 +1,25 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Objects; /** A single record. */ -@ApiModel(description = "A single record.") public class Record extends HashMap { - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; - public static final String SERIALIZED_NAME_HIGHLIGHT_RESULT = - "_highlightResult"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_RESULT) + @SerializedName("_highlightResult") private HighlightResult highlightResult; - public static final String SERIALIZED_NAME_SNIPPET_RESULT = "_snippetResult"; - - @SerializedName(SERIALIZED_NAME_SNIPPET_RESULT) + @SerializedName("_snippetResult") private SnippetResult snippetResult; - public static final String SERIALIZED_NAME_RANKING_INFO = "_rankingInfo"; - - @SerializedName(SERIALIZED_NAME_RANKING_INFO) + @SerializedName("_rankingInfo") private RankingInfo rankingInfo; - public static final String SERIALIZED_NAME_DISTINCT_SEQ_I_D = - "_distinctSeqID"; - - @SerializedName(SERIALIZED_NAME_DISTINCT_SEQ_I_D) + @SerializedName("_distinctSeqID") private Integer distinctSeqID; public Record objectID(String objectID) { @@ -48,7 +33,6 @@ public Record objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unique identifier of the object.") public String getObjectID() { return objectID; } @@ -68,7 +52,6 @@ public Record highlightResult(HighlightResult highlightResult) { * @return highlightResult */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public HighlightResult getHighlightResult() { return highlightResult; } @@ -88,7 +71,6 @@ public Record snippetResult(SnippetResult snippetResult) { * @return snippetResult */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SnippetResult getSnippetResult() { return snippetResult; } @@ -108,7 +90,6 @@ public Record rankingInfo(RankingInfo rankingInfo) { * @return rankingInfo */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public RankingInfo getRankingInfo() { return rankingInfo; } @@ -128,7 +109,6 @@ public Record distinctSeqID(Integer distinctSeqID) { * @return distinctSeqID */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Integer getDistinctSeqID() { return distinctSeqID; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RemoveUserIdResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RemoveUserIdResponse.java index ada941fafaa..968a4f4f203 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RemoveUserIdResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/RemoveUserIdResponse.java @@ -1,16 +1,13 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** RemoveUserIdResponse */ public class RemoveUserIdResponse { - public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; - - @SerializedName(SERIALIZED_NAME_DELETED_AT) + @SerializedName("deletedAt") private OffsetDateTime deletedAt; public RemoveUserIdResponse deletedAt(OffsetDateTime deletedAt) { @@ -24,10 +21,6 @@ public RemoveUserIdResponse deletedAt(OffsetDateTime deletedAt) { * @return deletedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of deletion (ISO-8601 format)." - ) public OffsetDateTime getDeletedAt() { return deletedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ReplaceSourceResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ReplaceSourceResponse.java index 5b1d6d9e798..85d8133b4fb 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ReplaceSourceResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ReplaceSourceResponse.java @@ -1,16 +1,13 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** ReplaceSourceResponse */ public class ReplaceSourceResponse { - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; public ReplaceSourceResponse updatedAt(OffsetDateTime updatedAt) { @@ -24,10 +21,6 @@ public ReplaceSourceResponse updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of last update (ISO-8601 format)." - ) public OffsetDateTime getUpdatedAt() { return updatedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Rule.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Rule.java index b9c2a64ecb9..318057b8108 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Rule.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Rule.java @@ -1,44 +1,29 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Rule object. */ -@ApiModel(description = "Rule object.") public class Rule { - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; - public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; - - @SerializedName(SERIALIZED_NAME_CONDITIONS) + @SerializedName("conditions") private List conditions = null; - public static final String SERIALIZED_NAME_CONSEQUENCE = "consequence"; - - @SerializedName(SERIALIZED_NAME_CONSEQUENCE) + @SerializedName("consequence") private Consequence consequence; - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @SerializedName("description") private String description; - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - - @SerializedName(SERIALIZED_NAME_ENABLED) + @SerializedName("enabled") private Boolean enabled = true; - public static final String SERIALIZED_NAME_VALIDITY = "validity"; - - @SerializedName(SERIALIZED_NAME_VALIDITY) + @SerializedName("validity") private List validity = null; public Rule objectID(String objectID) { @@ -52,7 +37,6 @@ public Rule objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unique identifier of the object.") public String getObjectID() { return objectID; } @@ -81,10 +65,6 @@ public Rule addConditionsItem(Condition conditionsItem) { * @return conditions */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A list of conditions that should apply to activate a Rule. You can use up to 25" + - " conditions per Rule." - ) public List getConditions() { return conditions; } @@ -104,7 +84,6 @@ public Rule consequence(Consequence consequence) { * @return consequence */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public Consequence getConsequence() { return consequence; } @@ -125,10 +104,6 @@ public Rule description(String description) { * @return description */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This field is intended for Rule management purposes, in particular to ease searching for" + - " Rules and presenting them to human readers. It's not interpreted by the API." - ) public String getDescription() { return description; } @@ -149,10 +124,6 @@ public Rule enabled(Boolean enabled) { * @return enabled */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the Rule is enabled. Disabled Rules remain in the index, but aren't applied at" + - " query time." - ) public Boolean getEnabled() { return enabled; } @@ -181,11 +152,6 @@ public Rule addValidityItem(TimeRange validityItem) { * @return validity */ @javax.annotation.Nullable - @ApiModelProperty( - value = "By default, Rules are permanently valid. When validity periods are specified, the Rule" + - " applies only during those periods; it's ignored the rest of the time. The list" + - " must not be empty." - ) public List getValidity() { return validity; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveObjectResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveObjectResponse.java index 176038ae909..5070869c0de 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveObjectResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveObjectResponse.java @@ -1,25 +1,18 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** SaveObjectResponse */ public class SaveObjectResponse { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - - @SerializedName(SERIALIZED_NAME_CREATED_AT) + @SerializedName("createdAt") private String createdAt; - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Integer taskID; - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; public SaveObjectResponse createdAt(String createdAt) { @@ -33,7 +26,6 @@ public SaveObjectResponse createdAt(String createdAt) { * @return createdAt */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public String getCreatedAt() { return createdAt; } @@ -53,7 +45,6 @@ public SaveObjectResponse taskID(Integer taskID) { * @return taskID */ @javax.annotation.Nullable - @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { return taskID; } @@ -73,7 +64,6 @@ public SaveObjectResponse objectID(String objectID) { * @return objectID */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unique identifier of the object.") public String getObjectID() { return objectID; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymResponse.java index 47a5c4d96e9..ac3082256eb 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymResponse.java @@ -1,26 +1,19 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** SaveSynonymResponse */ public class SaveSynonymResponse { - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Integer taskID; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) + @SerializedName("id") private String id; public SaveSynonymResponse taskID(Integer taskID) { @@ -34,10 +27,6 @@ public SaveSynonymResponse taskID(Integer taskID) { * @return taskID */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "taskID of the indexing task to wait for." - ) public Integer getTaskID() { return taskID; } @@ -57,10 +46,6 @@ public SaveSynonymResponse updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of last update (ISO-8601 format)." - ) public OffsetDateTime getUpdatedAt() { return updatedAt; } @@ -80,7 +65,6 @@ public SaveSynonymResponse id(String id) { * @return id */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "objectID of the inserted object.") public String getId() { return id; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchDictionaryEntries.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchDictionaryEntries.java index b321e9e82b3..79bb7a6fdcc 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchDictionaryEntries.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchDictionaryEntries.java @@ -1,32 +1,21 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** The `searchDictionaryEntries` request. */ -@ApiModel(description = "The `searchDictionaryEntries` request.") public class SearchDictionaryEntries { - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_LANGUAGE = "language"; - - @SerializedName(SERIALIZED_NAME_LANGUAGE) + @SerializedName("language") private String language; public SearchDictionaryEntries query(String query) { @@ -40,7 +29,6 @@ public SearchDictionaryEntries query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { return query; } @@ -60,7 +48,6 @@ public SearchDictionaryEntries page(Integer page) { * @return page */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -80,7 +67,6 @@ public SearchDictionaryEntries hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -100,9 +86,6 @@ public SearchDictionaryEntries language(String language) { * @return language */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Language ISO code supported by the dictionary (e.g., \"en\" for English)." - ) public String getLanguage() { return language; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesRequest.java index a394c8f3ccd..61a4b4bc113 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesRequest.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesRequest.java @@ -1,25 +1,18 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** SearchForFacetValuesRequest */ public class SearchForFacetValuesRequest { - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params = ""; - public static final String SERIALIZED_NAME_FACET_QUERY = "facetQuery"; - - @SerializedName(SERIALIZED_NAME_FACET_QUERY) + @SerializedName("facetQuery") private String facetQuery = ""; - public static final String SERIALIZED_NAME_MAX_FACET_HITS = "maxFacetHits"; - - @SerializedName(SERIALIZED_NAME_MAX_FACET_HITS) + @SerializedName("maxFacetHits") private Integer maxFacetHits = 10; public SearchForFacetValuesRequest params(String params) { @@ -33,7 +26,6 @@ public SearchForFacetValuesRequest params(String params) { * @return params */ @javax.annotation.Nullable - @ApiModelProperty(value = "Search parameters as URL-encoded query string.") public String getParams() { return params; } @@ -53,7 +45,6 @@ public SearchForFacetValuesRequest facetQuery(String facetQuery) { * @return facetQuery */ @javax.annotation.Nullable - @ApiModelProperty(value = "Text to search inside the facet's values.") public String getFacetQuery() { return facetQuery; } @@ -74,10 +65,6 @@ public SearchForFacetValuesRequest maxFacetHits(Integer maxFacetHits) { * @return maxFacetHits */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet hits to return during a search for facet values. For performance" + - " reasons, the maximum allowed number of returned values is 100." - ) public Integer getMaxFacetHits() { return maxFacetHits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponse.java index 6840a9611f7..fb9e84ce603 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,9 +8,7 @@ /** SearchForFacetValuesResponse */ public class SearchForFacetValuesResponse { - public static final String SERIALIZED_NAME_FACET_HITS = "facetHits"; - - @SerializedName(SERIALIZED_NAME_FACET_HITS) + @SerializedName("facetHits") private List facetHits = new ArrayList<>(); public SearchForFacetValuesResponse facetHits( @@ -34,7 +31,6 @@ public SearchForFacetValuesResponse addFacetHitsItem( * @return facetHits */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public List getFacetHits() { return facetHits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponseFacetHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponseFacetHits.java index 2fbc1252fe7..10b39b4fbc6 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponseFacetHits.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchForFacetValuesResponseFacetHits.java @@ -1,25 +1,18 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** SearchForFacetValuesResponseFacetHits */ public class SearchForFacetValuesResponseFacetHits { - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) + @SerializedName("value") private String value; - public static final String SERIALIZED_NAME_HIGHLIGHTED = "highlighted"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHTED) + @SerializedName("highlighted") private String highlighted; - public static final String SERIALIZED_NAME_COUNT = "count"; - - @SerializedName(SERIALIZED_NAME_COUNT) + @SerializedName("count") private Integer count; public SearchForFacetValuesResponseFacetHits value(String value) { @@ -33,7 +26,6 @@ public SearchForFacetValuesResponseFacetHits value(String value) { * @return value */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Raw value of the facet.") public String getValue() { return value; } @@ -53,11 +45,6 @@ public SearchForFacetValuesResponseFacetHits highlighted(String highlighted) { * @return highlighted */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "George Clooney", - required = true, - value = "Markup text with occurrences highlighted." - ) public String getHighlighted() { return highlighted; } @@ -78,12 +65,6 @@ public SearchForFacetValuesResponseFacetHits count(Integer count) { * @return count */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "How many objects contain this facet value. This takes into account the extra search" + - " parameters specified in the query. Like for a regular search query, the counts" + - " may not be exhaustive." - ) public Integer getCount() { return count; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java index 0901da6c69c..f9aa717162a 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,9 +8,7 @@ /** SearchHits */ public class SearchHits { - public static final String SERIALIZED_NAME_HITS = "hits"; - - @SerializedName(SERIALIZED_NAME_HITS) + @SerializedName("hits") private List hits = null; public SearchHits hits(List hits) { @@ -33,7 +30,6 @@ public SearchHits addHitsItem(Record hitsItem) { * @return hits */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getHits() { return hits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java index 47de49da17e..c9fdce5d1bf 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -17,287 +16,157 @@ /** SearchParams */ public class SearchParams { - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params = ""; - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_SIMILAR_QUERY = "similarQuery"; - - @SerializedName(SERIALIZED_NAME_SIMILAR_QUERY) + @SerializedName("similarQuery") private String similarQuery = ""; - public static final String SERIALIZED_NAME_FILTERS = "filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) + @SerializedName("filters") private String filters = ""; - public static final String SERIALIZED_NAME_FACET_FILTERS = "facetFilters"; - - @SerializedName(SERIALIZED_NAME_FACET_FILTERS) + @SerializedName("facetFilters") private List facetFilters = null; - public static final String SERIALIZED_NAME_OPTIONAL_FILTERS = - "optionalFilters"; - - @SerializedName(SERIALIZED_NAME_OPTIONAL_FILTERS) + @SerializedName("optionalFilters") private List optionalFilters = null; - public static final String SERIALIZED_NAME_NUMERIC_FILTERS = "numericFilters"; - - @SerializedName(SERIALIZED_NAME_NUMERIC_FILTERS) + @SerializedName("numericFilters") private List numericFilters = null; - public static final String SERIALIZED_NAME_TAG_FILTERS = "tagFilters"; - - @SerializedName(SERIALIZED_NAME_TAG_FILTERS) + @SerializedName("tagFilters") private List tagFilters = null; - public static final String SERIALIZED_NAME_SUM_OR_FILTERS_SCORES = - "sumOrFiltersScores"; - - @SerializedName(SERIALIZED_NAME_SUM_OR_FILTERS_SCORES) + @SerializedName("sumOrFiltersScores") private Boolean sumOrFiltersScores = false; - public static final String SERIALIZED_NAME_FACETS = "facets"; - - @SerializedName(SERIALIZED_NAME_FACETS) + @SerializedName("facets") private List facets = null; - public static final String SERIALIZED_NAME_MAX_VALUES_PER_FACET = - "maxValuesPerFacet"; - - @SerializedName(SERIALIZED_NAME_MAX_VALUES_PER_FACET) + @SerializedName("maxValuesPerFacet") private Integer maxValuesPerFacet = 100; - public static final String SERIALIZED_NAME_FACETING_AFTER_DISTINCT = - "facetingAfterDistinct"; - - @SerializedName(SERIALIZED_NAME_FACETING_AFTER_DISTINCT) + @SerializedName("facetingAfterDistinct") private Boolean facetingAfterDistinct = false; - public static final String SERIALIZED_NAME_SORT_FACET_VALUES_BY = - "sortFacetValuesBy"; - - @SerializedName(SERIALIZED_NAME_SORT_FACET_VALUES_BY) + @SerializedName("sortFacetValuesBy") private String sortFacetValuesBy = "count"; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_OFFSET = "offset"; - - @SerializedName(SERIALIZED_NAME_OFFSET) + @SerializedName("offset") private Integer offset; - public static final String SERIALIZED_NAME_LENGTH = "length"; - - @SerializedName(SERIALIZED_NAME_LENGTH) + @SerializedName("length") private Integer length; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG = "aroundLatLng"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG) + @SerializedName("aroundLatLng") private String aroundLatLng = ""; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG_VIA_I_P = - "aroundLatLngViaIP"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG_VIA_I_P) + @SerializedName("aroundLatLngViaIP") private Boolean aroundLatLngViaIP = false; - public static final String SERIALIZED_NAME_AROUND_RADIUS = "aroundRadius"; - - @SerializedName(SERIALIZED_NAME_AROUND_RADIUS) + @SerializedName("aroundRadius") private OneOfintegerstring aroundRadius; - public static final String SERIALIZED_NAME_AROUND_PRECISION = - "aroundPrecision"; - - @SerializedName(SERIALIZED_NAME_AROUND_PRECISION) + @SerializedName("aroundPrecision") private Integer aroundPrecision = 10; - public static final String SERIALIZED_NAME_MINIMUM_AROUND_RADIUS = - "minimumAroundRadius"; - - @SerializedName(SERIALIZED_NAME_MINIMUM_AROUND_RADIUS) + @SerializedName("minimumAroundRadius") private Integer minimumAroundRadius; - public static final String SERIALIZED_NAME_INSIDE_BOUNDING_BOX = - "insideBoundingBox"; - - @SerializedName(SERIALIZED_NAME_INSIDE_BOUNDING_BOX) + @SerializedName("insideBoundingBox") private List insideBoundingBox = null; - public static final String SERIALIZED_NAME_INSIDE_POLYGON = "insidePolygon"; - - @SerializedName(SERIALIZED_NAME_INSIDE_POLYGON) + @SerializedName("insidePolygon") private List insidePolygon = null; - public static final String SERIALIZED_NAME_NATURAL_LANGUAGES = - "naturalLanguages"; - - @SerializedName(SERIALIZED_NAME_NATURAL_LANGUAGES) + @SerializedName("naturalLanguages") private List naturalLanguages = null; - public static final String SERIALIZED_NAME_RULE_CONTEXTS = "ruleContexts"; - - @SerializedName(SERIALIZED_NAME_RULE_CONTEXTS) + @SerializedName("ruleContexts") private List ruleContexts = null; - public static final String SERIALIZED_NAME_PERSONALIZATION_IMPACT = - "personalizationImpact"; - - @SerializedName(SERIALIZED_NAME_PERSONALIZATION_IMPACT) + @SerializedName("personalizationImpact") private Integer personalizationImpact = 100; - public static final String SERIALIZED_NAME_USER_TOKEN = "userToken"; - - @SerializedName(SERIALIZED_NAME_USER_TOKEN) + @SerializedName("userToken") private String userToken; - public static final String SERIALIZED_NAME_GET_RANKING_INFO = - "getRankingInfo"; - - @SerializedName(SERIALIZED_NAME_GET_RANKING_INFO) + @SerializedName("getRankingInfo") private Boolean getRankingInfo = false; - public static final String SERIALIZED_NAME_CLICK_ANALYTICS = "clickAnalytics"; - - @SerializedName(SERIALIZED_NAME_CLICK_ANALYTICS) + @SerializedName("clickAnalytics") private Boolean clickAnalytics = false; - public static final String SERIALIZED_NAME_ANALYTICS = "analytics"; - - @SerializedName(SERIALIZED_NAME_ANALYTICS) + @SerializedName("analytics") private Boolean analytics = true; - public static final String SERIALIZED_NAME_ANALYTICS_TAGS = "analyticsTags"; - - @SerializedName(SERIALIZED_NAME_ANALYTICS_TAGS) + @SerializedName("analyticsTags") private List analyticsTags = null; - public static final String SERIALIZED_NAME_PERCENTILE_COMPUTATION = - "percentileComputation"; - - @SerializedName(SERIALIZED_NAME_PERCENTILE_COMPUTATION) + @SerializedName("percentileComputation") private Boolean percentileComputation = true; - public static final String SERIALIZED_NAME_ENABLE_A_B_TEST = "enableABTest"; - - @SerializedName(SERIALIZED_NAME_ENABLE_A_B_TEST) + @SerializedName("enableABTest") private Boolean enableABTest = true; - public static final String SERIALIZED_NAME_ENABLE_RE_RANKING = - "enableReRanking"; - - @SerializedName(SERIALIZED_NAME_ENABLE_RE_RANKING) + @SerializedName("enableReRanking") private Boolean enableReRanking = true; - public static final String SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES = - "searchableAttributes"; - - @SerializedName(SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES) + @SerializedName("searchableAttributes") private List searchableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING = - "attributesForFaceting"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING) + @SerializedName("attributesForFaceting") private List attributesForFaceting = null; - public static final String SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES = - "unretrievableAttributes"; - - @SerializedName(SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES) + @SerializedName("unretrievableAttributes") private List unretrievableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE = - "attributesToRetrieve"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE) + @SerializedName("attributesToRetrieve") private List attributesToRetrieve = null; - public static final String SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES = - "restrictSearchableAttributes"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES) + @SerializedName("restrictSearchableAttributes") private List restrictSearchableAttributes = null; - public static final String SERIALIZED_NAME_RANKING = "ranking"; - - @SerializedName(SERIALIZED_NAME_RANKING) + @SerializedName("ranking") private List ranking = null; - public static final String SERIALIZED_NAME_CUSTOM_RANKING = "customRanking"; - - @SerializedName(SERIALIZED_NAME_CUSTOM_RANKING) + @SerializedName("customRanking") private List customRanking = null; - public static final String SERIALIZED_NAME_RELEVANCY_STRICTNESS = - "relevancyStrictness"; - - @SerializedName(SERIALIZED_NAME_RELEVANCY_STRICTNESS) + @SerializedName("relevancyStrictness") private Integer relevancyStrictness = 100; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT = - "attributesToHighlight"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT) + @SerializedName("attributesToHighlight") private List attributesToHighlight = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET = - "attributesToSnippet"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET) + @SerializedName("attributesToSnippet") private List attributesToSnippet = null; - public static final String SERIALIZED_NAME_HIGHLIGHT_PRE_TAG = - "highlightPreTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_PRE_TAG) + @SerializedName("highlightPreTag") private String highlightPreTag = ""; - public static final String SERIALIZED_NAME_HIGHLIGHT_POST_TAG = - "highlightPostTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_POST_TAG) + @SerializedName("highlightPostTag") private String highlightPostTag = ""; - public static final String SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT = - "snippetEllipsisText"; - - @SerializedName(SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT) + @SerializedName("snippetEllipsisText") private String snippetEllipsisText = "…"; - public static final String SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS = - "restrictHighlightAndSnippetArrays"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS) + @SerializedName("restrictHighlightAndSnippetArrays") private Boolean restrictHighlightAndSnippetArrays = false; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO = - "minWordSizefor1Typo"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO) + @SerializedName("minWordSizefor1Typo") private Integer minWordSizefor1Typo = 4; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS = - "minWordSizefor2Typos"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS) + @SerializedName("minWordSizefor2Typos") private Integer minWordSizefor2Typos = 8; /** Controls whether typo tolerance is enabled and how it is applied. */ @@ -354,66 +223,37 @@ public TypoToleranceEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_TYPO_TOLERANCE = "typoTolerance"; - - @SerializedName(SERIALIZED_NAME_TYPO_TOLERANCE) + @SerializedName("typoTolerance") private TypoToleranceEnum typoTolerance = TypoToleranceEnum.TRUE; - public static final String SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS = - "allowTyposOnNumericTokens"; - - @SerializedName(SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS) + @SerializedName("allowTyposOnNumericTokens") private Boolean allowTyposOnNumericTokens = true; - public static final String SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES = - "disableTypoToleranceOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES) + @SerializedName("disableTypoToleranceOnAttributes") private List disableTypoToleranceOnAttributes = null; - public static final String SERIALIZED_NAME_SEPARATORS_TO_INDEX = - "separatorsToIndex"; - - @SerializedName(SERIALIZED_NAME_SEPARATORS_TO_INDEX) + @SerializedName("separatorsToIndex") private String separatorsToIndex = ""; - public static final String SERIALIZED_NAME_IGNORE_PLURALS = "ignorePlurals"; - - @SerializedName(SERIALIZED_NAME_IGNORE_PLURALS) + @SerializedName("ignorePlurals") private String ignorePlurals = "false"; - public static final String SERIALIZED_NAME_REMOVE_STOP_WORDS = - "removeStopWords"; - - @SerializedName(SERIALIZED_NAME_REMOVE_STOP_WORDS) + @SerializedName("removeStopWords") private String removeStopWords = "false"; - public static final String SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS = - "keepDiacriticsOnCharacters"; - - @SerializedName(SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS) + @SerializedName("keepDiacriticsOnCharacters") private String keepDiacriticsOnCharacters = ""; - public static final String SERIALIZED_NAME_QUERY_LANGUAGES = "queryLanguages"; - - @SerializedName(SERIALIZED_NAME_QUERY_LANGUAGES) + @SerializedName("queryLanguages") private List queryLanguages = null; - public static final String SERIALIZED_NAME_DECOMPOUND_QUERY = - "decompoundQuery"; - - @SerializedName(SERIALIZED_NAME_DECOMPOUND_QUERY) + @SerializedName("decompoundQuery") private Boolean decompoundQuery = true; - public static final String SERIALIZED_NAME_ENABLE_RULES = "enableRules"; - - @SerializedName(SERIALIZED_NAME_ENABLE_RULES) + @SerializedName("enableRules") private Boolean enableRules = true; - public static final String SERIALIZED_NAME_ENABLE_PERSONALIZATION = - "enablePersonalization"; - - @SerializedName(SERIALIZED_NAME_ENABLE_PERSONALIZATION) + @SerializedName("enablePersonalization") private Boolean enablePersonalization = false; /** Controls if and how query words are interpreted as prefixes. */ @@ -468,9 +308,7 @@ public QueryTypeEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_QUERY_TYPE = "queryType"; - - @SerializedName(SERIALIZED_NAME_QUERY_TYPE) + @SerializedName("queryType") private QueryTypeEnum queryType = QueryTypeEnum.PREFIXLAST; /** Selects a strategy to remove words from the query when it doesn't match any hits. */ @@ -528,27 +366,17 @@ public RemoveWordsIfNoResultsEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS = - "removeWordsIfNoResults"; - - @SerializedName(SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS) + @SerializedName("removeWordsIfNoResults") private RemoveWordsIfNoResultsEnum removeWordsIfNoResults = RemoveWordsIfNoResultsEnum.NONE; - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX = "advancedSyntax"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX) + @SerializedName("advancedSyntax") private Boolean advancedSyntax = false; - public static final String SERIALIZED_NAME_OPTIONAL_WORDS = "optionalWords"; - - @SerializedName(SERIALIZED_NAME_OPTIONAL_WORDS) + @SerializedName("optionalWords") private List optionalWords = null; - public static final String SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES = - "disableExactOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES) + @SerializedName("disableExactOnAttributes") private List disableExactOnAttributes = null; /** Controls how the exact ranking criterion is computed when the query contains only one word. */ @@ -604,10 +432,7 @@ public ExactOnSingleWordQueryEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY = - "exactOnSingleWordQuery"; - - @SerializedName(SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY) + @SerializedName("exactOnSingleWordQuery") private ExactOnSingleWordQueryEnum exactOnSingleWordQuery = ExactOnSingleWordQueryEnum.ATTRIBUTE; @@ -663,10 +488,7 @@ public AlternativesAsExactEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ALTERNATIVES_AS_EXACT = - "alternativesAsExact"; - - @SerializedName(SERIALIZED_NAME_ALTERNATIVES_AS_EXACT) + @SerializedName("alternativesAsExact") private List alternativesAsExact = null; /** Gets or Sets advancedSyntaxFeatures */ @@ -720,53 +542,31 @@ public AdvancedSyntaxFeaturesEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES = - "advancedSyntaxFeatures"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES) + @SerializedName("advancedSyntaxFeatures") private List advancedSyntaxFeatures = null; - public static final String SERIALIZED_NAME_DISTINCT = "distinct"; - - @SerializedName(SERIALIZED_NAME_DISTINCT) + @SerializedName("distinct") private Integer distinct = 0; - public static final String SERIALIZED_NAME_SYNONYMS = "synonyms"; - - @SerializedName(SERIALIZED_NAME_SYNONYMS) + @SerializedName("synonyms") private Boolean synonyms = true; - public static final String SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT = - "replaceSynonymsInHighlight"; - - @SerializedName(SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT) + @SerializedName("replaceSynonymsInHighlight") private Boolean replaceSynonymsInHighlight = false; - public static final String SERIALIZED_NAME_MIN_PROXIMITY = "minProximity"; - - @SerializedName(SERIALIZED_NAME_MIN_PROXIMITY) + @SerializedName("minProximity") private Integer minProximity = 1; - public static final String SERIALIZED_NAME_RESPONSE_FIELDS = "responseFields"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_FIELDS) + @SerializedName("responseFields") private List responseFields = null; - public static final String SERIALIZED_NAME_MAX_FACET_HITS = "maxFacetHits"; - - @SerializedName(SERIALIZED_NAME_MAX_FACET_HITS) + @SerializedName("maxFacetHits") private Integer maxFacetHits = 10; - public static final String SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY = - "attributeCriteriaComputedByMinProximity"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY) + @SerializedName("attributeCriteriaComputedByMinProximity") private Boolean attributeCriteriaComputedByMinProximity = false; - public static final String SERIALIZED_NAME_RENDERING_CONTENT = - "renderingContent"; - - @SerializedName(SERIALIZED_NAME_RENDERING_CONTENT) + @SerializedName("renderingContent") private Object renderingContent = new Object(); public SearchParams params(String params) { @@ -780,7 +580,6 @@ public SearchParams params(String params) { * @return params */ @javax.annotation.Nullable - @ApiModelProperty(value = "Search parameters as URL-encoded query string.") public String getParams() { return params; } @@ -800,7 +599,6 @@ public SearchParams query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { return query; } @@ -821,10 +619,6 @@ public SearchParams similarQuery(String similarQuery) { * @return similarQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Overrides the query parameter and performs a more generic search that can be used to" + - " find \"similar\" results." - ) public String getSimilarQuery() { return similarQuery; } @@ -844,9 +638,6 @@ public SearchParams filters(String filters) { * @return filters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Filter the query with numeric, facet and/or tag filters." - ) public String getFilters() { return filters; } @@ -874,7 +665,6 @@ public SearchParams addFacetFiltersItem(String facetFiltersItem) { * @return facetFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter hits by facet value.") public List getFacetFilters() { return facetFilters; } @@ -903,10 +693,6 @@ public SearchParams addOptionalFiltersItem(String optionalFiltersItem) { * @return optionalFilters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Create filters for ranking purposes, where records that match the filter are ranked" + - " higher, or lower in the case of a negative optional filter." - ) public List getOptionalFilters() { return optionalFilters; } @@ -934,7 +720,6 @@ public SearchParams addNumericFiltersItem(String numericFiltersItem) { * @return numericFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter on numeric attributes.") public List getNumericFilters() { return numericFilters; } @@ -962,7 +747,6 @@ public SearchParams addTagFiltersItem(String tagFiltersItem) { * @return tagFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter hits by tags.") public List getTagFilters() { return tagFilters; } @@ -982,9 +766,6 @@ public SearchParams sumOrFiltersScores(Boolean sumOrFiltersScores) { * @return sumOrFiltersScores */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Determines how to calculate the total score for filtering." - ) public Boolean getSumOrFiltersScores() { return sumOrFiltersScores; } @@ -1012,7 +793,6 @@ public SearchParams addFacetsItem(String facetsItem) { * @return facets */ @javax.annotation.Nullable - @ApiModelProperty(value = "Retrieve facets and their facet values.") public List getFacets() { return facets; } @@ -1032,9 +812,6 @@ public SearchParams maxValuesPerFacet(Integer maxValuesPerFacet) { * @return maxValuesPerFacet */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet values to return for each facet during a regular search." - ) public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; } @@ -1054,9 +831,6 @@ public SearchParams facetingAfterDistinct(Boolean facetingAfterDistinct) { * @return facetingAfterDistinct */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Force faceting to be applied after de-duplication (via the Distinct setting)." - ) public Boolean getFacetingAfterDistinct() { return facetingAfterDistinct; } @@ -1076,7 +850,6 @@ public SearchParams sortFacetValuesBy(String sortFacetValuesBy) { * @return sortFacetValuesBy */ @javax.annotation.Nullable - @ApiModelProperty(value = "Controls how facet values are fetched.") public String getSortFacetValuesBy() { return sortFacetValuesBy; } @@ -1096,7 +869,6 @@ public SearchParams page(Integer page) { * @return page */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -1116,7 +888,6 @@ public SearchParams offset(Integer offset) { * @return offset */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the offset of the first hit to return.") public Integer getOffset() { return offset; } @@ -1136,9 +907,6 @@ public SearchParams length(Integer length) { * @return length */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Set the number of hits to retrieve (used only with offset)." - ) public Integer getLength() { return length; } @@ -1158,10 +926,6 @@ public SearchParams aroundLatLng(String aroundLatLng) { * @return aroundLatLng */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search for entries around a central geolocation, enabling a geo search within a circular" + - " area." - ) public String getAroundLatLng() { return aroundLatLng; } @@ -1182,10 +946,6 @@ public SearchParams aroundLatLngViaIP(Boolean aroundLatLngViaIP) { * @return aroundLatLngViaIP */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search for entries around a given location automatically computed from the requester's" + - " IP address." - ) public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; } @@ -1205,9 +965,6 @@ public SearchParams aroundRadius(OneOfintegerstring aroundRadius) { * @return aroundRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Define the maximum radius for a geo search (in meters)." - ) public OneOfintegerstring getAroundRadius() { return aroundRadius; } @@ -1227,10 +984,6 @@ public SearchParams aroundPrecision(Integer aroundPrecision) { * @return aroundPrecision */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Precision of geo search (in meters), to add grouping by geo location to the ranking" + - " formula." - ) public Integer getAroundPrecision() { return aroundPrecision; } @@ -1250,9 +1003,6 @@ public SearchParams minimumAroundRadius(Integer minimumAroundRadius) { * @return minimumAroundRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum radius (in meters) used for a geo search when aroundRadius is not set." - ) public Integer getMinimumAroundRadius() { return minimumAroundRadius; } @@ -1282,9 +1032,6 @@ public SearchParams addInsideBoundingBoxItem( * @return insideBoundingBox */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search inside a rectangular area (in geo coordinates)." - ) public List getInsideBoundingBox() { return insideBoundingBox; } @@ -1312,7 +1059,6 @@ public SearchParams addInsidePolygonItem(BigDecimal insidePolygonItem) { * @return insidePolygon */ @javax.annotation.Nullable - @ApiModelProperty(value = "Search inside a polygon (in geo coordinates).") public List getInsidePolygon() { return insidePolygon; } @@ -1344,13 +1090,6 @@ public SearchParams addNaturalLanguagesItem(String naturalLanguagesItem) { * @return naturalLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This parameter changes the default values of certain parameters and settings that work" + - " best for a natural language query, such as ignorePlurals, removeStopWords," + - " removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and" + - " settings work well together when the query is formatted in natural language" + - " instead of keywords, for example when your user performs a voice search." - ) public List getNaturalLanguages() { return naturalLanguages; } @@ -1378,7 +1117,6 @@ public SearchParams addRuleContextsItem(String ruleContextsItem) { * @return ruleContexts */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables contextual rules.") public List getRuleContexts() { return ruleContexts; } @@ -1398,7 +1136,6 @@ public SearchParams personalizationImpact(Integer personalizationImpact) { * @return personalizationImpact */ @javax.annotation.Nullable - @ApiModelProperty(value = "Define the impact of the Personalization feature.") public Integer getPersonalizationImpact() { return personalizationImpact; } @@ -1418,9 +1155,6 @@ public SearchParams userToken(String userToken) { * @return userToken */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Associates a certain user token with the current search." - ) public String getUserToken() { return userToken; } @@ -1440,7 +1174,6 @@ public SearchParams getRankingInfo(Boolean getRankingInfo) { * @return getRankingInfo */ @javax.annotation.Nullable - @ApiModelProperty(value = "Retrieve detailed ranking information.") public Boolean getGetRankingInfo() { return getRankingInfo; } @@ -1460,7 +1193,6 @@ public SearchParams clickAnalytics(Boolean clickAnalytics) { * @return clickAnalytics */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enable the Click Analytics feature.") public Boolean getClickAnalytics() { return clickAnalytics; } @@ -1480,9 +1212,6 @@ public SearchParams analytics(Boolean analytics) { * @return analytics */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the current query will be taken into account in the Analytics." - ) public Boolean getAnalytics() { return analytics; } @@ -1510,9 +1239,6 @@ public SearchParams addAnalyticsTagsItem(String analyticsTagsItem) { * @return analyticsTags */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of tags to apply to the query for analytics purposes." - ) public List getAnalyticsTags() { return analyticsTags; } @@ -1532,9 +1258,6 @@ public SearchParams percentileComputation(Boolean percentileComputation) { * @return percentileComputation */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to include or exclude a query from the processing-time percentile computation." - ) public Boolean getPercentileComputation() { return percentileComputation; } @@ -1554,9 +1277,6 @@ public SearchParams enableABTest(Boolean enableABTest) { * @return enableABTest */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether this search should participate in running AB tests." - ) public Boolean getEnableABTest() { return enableABTest; } @@ -1576,7 +1296,6 @@ public SearchParams enableReRanking(Boolean enableReRanking) { * @return enableReRanking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether this search should use AI Re-Ranking.") public Boolean getEnableReRanking() { return enableReRanking; } @@ -1606,9 +1325,6 @@ public SearchParams addSearchableAttributesItem( * @return searchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes used for searching." - ) public List getSearchableAttributes() { return searchableAttributes; } @@ -1640,9 +1356,6 @@ public SearchParams addAttributesForFacetingItem( * @return attributesForFaceting */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes that will be used for faceting." - ) public List getAttributesForFaceting() { return attributesForFaceting; } @@ -1674,9 +1387,6 @@ public SearchParams addUnretrievableAttributesItem( * @return unretrievableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes that can't be retrieved at query time." - ) public List getUnretrievableAttributes() { return unretrievableAttributes; } @@ -1706,9 +1416,6 @@ public SearchParams addAttributesToRetrieveItem( * @return attributesToRetrieve */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This parameter controls which attributes to retrieve and which not to retrieve." - ) public List getAttributesToRetrieve() { return attributesToRetrieve; } @@ -1740,9 +1447,6 @@ public SearchParams addRestrictSearchableAttributesItem( * @return restrictSearchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restricts a given query to look in only a subset of your searchable attributes." - ) public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; } @@ -1772,7 +1476,6 @@ public SearchParams addRankingItem(String rankingItem) { * @return ranking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Controls how Algolia should sort your results.") public List getRanking() { return ranking; } @@ -1800,7 +1503,6 @@ public SearchParams addCustomRankingItem(String customRankingItem) { * @return customRanking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specifies the custom ranking criterion.") public List getCustomRanking() { return customRanking; } @@ -1821,10 +1523,6 @@ public SearchParams relevancyStrictness(Integer relevancyStrictness) { * @return relevancyStrictness */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls the relevancy threshold below which less relevant results aren't included in" + - " the results." - ) public Integer getRelevancyStrictness() { return relevancyStrictness; } @@ -1856,7 +1554,6 @@ public SearchParams addAttributesToHighlightItem( * @return attributesToHighlight */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of attributes to highlight.") public List getAttributesToHighlight() { return attributesToHighlight; } @@ -1886,9 +1583,6 @@ public SearchParams addAttributesToSnippetItem( * @return attributesToSnippet */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes to snippet, with an optional maximum number of words to snippet." - ) public List getAttributesToSnippet() { return attributesToSnippet; } @@ -1908,10 +1602,6 @@ public SearchParams highlightPreTag(String highlightPreTag) { * @return highlightPreTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert before the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPreTag() { return highlightPreTag; } @@ -1931,10 +1621,6 @@ public SearchParams highlightPostTag(String highlightPostTag) { * @return highlightPostTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert after the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPostTag() { return highlightPostTag; } @@ -1954,9 +1640,6 @@ public SearchParams snippetEllipsisText(String snippetEllipsisText) { * @return snippetEllipsisText */ @javax.annotation.Nullable - @ApiModelProperty( - value = "String used as an ellipsis indicator when a snippet is truncated." - ) public String getSnippetEllipsisText() { return snippetEllipsisText; } @@ -1978,9 +1661,6 @@ public SearchParams restrictHighlightAndSnippetArrays( * @return restrictHighlightAndSnippetArrays */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict highlighting and snippeting to items that matched the query." - ) public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; } @@ -2002,7 +1682,6 @@ public SearchParams hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -2023,10 +1702,6 @@ public SearchParams minWordSizefor1Typo(Integer minWordSizefor1Typo) { * @return minWordSizefor1Typo */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 1 typo." - ) public Integer getMinWordSizefor1Typo() { return minWordSizefor1Typo; } @@ -2047,10 +1722,6 @@ public SearchParams minWordSizefor2Typos(Integer minWordSizefor2Typos) { * @return minWordSizefor2Typos */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 2 typos." - ) public Integer getMinWordSizefor2Typos() { return minWordSizefor2Typos; } @@ -2070,9 +1741,6 @@ public SearchParams typoTolerance(TypoToleranceEnum typoTolerance) { * @return typoTolerance */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls whether typo tolerance is enabled and how it is applied." - ) public TypoToleranceEnum getTypoTolerance() { return typoTolerance; } @@ -2094,9 +1762,6 @@ public SearchParams allowTyposOnNumericTokens( * @return allowTyposOnNumericTokens */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to allow typos on numbers (\"numeric tokens\") in the query string." - ) public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; } @@ -2130,9 +1795,6 @@ public SearchParams addDisableTypoToleranceOnAttributesItem( * @return disableTypoToleranceOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable typo tolerance." - ) public List getDisableTypoToleranceOnAttributes() { return disableTypoToleranceOnAttributes; } @@ -2154,7 +1816,6 @@ public SearchParams separatorsToIndex(String separatorsToIndex) { * @return separatorsToIndex */ @javax.annotation.Nullable - @ApiModelProperty(value = "Control which separators are indexed.") public String getSeparatorsToIndex() { return separatorsToIndex; } @@ -2174,9 +1835,6 @@ public SearchParams ignorePlurals(String ignorePlurals) { * @return ignorePlurals */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Treats singular, plurals, and other forms of declensions as matching terms." - ) public String getIgnorePlurals() { return ignorePlurals; } @@ -2196,9 +1854,6 @@ public SearchParams removeStopWords(String removeStopWords) { * @return removeStopWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Removes stop (common) words from the query before executing it." - ) public String getRemoveStopWords() { return removeStopWords; } @@ -2220,9 +1875,6 @@ public SearchParams keepDiacriticsOnCharacters( * @return keepDiacriticsOnCharacters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of characters that the engine shouldn't automatically normalize." - ) public String getKeepDiacriticsOnCharacters() { return keepDiacriticsOnCharacters; } @@ -2251,10 +1903,6 @@ public SearchParams addQueryLanguagesItem(String queryLanguagesItem) { * @return queryLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Sets the languages to be used by language-specific settings and functionalities such as" + - " ignorePlurals, removeStopWords, and CJK word-detection." - ) public List getQueryLanguages() { return queryLanguages; } @@ -2274,9 +1922,6 @@ public SearchParams decompoundQuery(Boolean decompoundQuery) { * @return decompoundQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Splits compound words into their composing atoms in the query." - ) public Boolean getDecompoundQuery() { return decompoundQuery; } @@ -2296,7 +1941,6 @@ public SearchParams enableRules(Boolean enableRules) { * @return enableRules */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether Rules should be globally enabled.") public Boolean getEnableRules() { return enableRules; } @@ -2316,7 +1960,6 @@ public SearchParams enablePersonalization(Boolean enablePersonalization) { * @return enablePersonalization */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enable the Personalization feature.") public Boolean getEnablePersonalization() { return enablePersonalization; } @@ -2336,9 +1979,6 @@ public SearchParams queryType(QueryTypeEnum queryType) { * @return queryType */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls if and how query words are interpreted as prefixes." - ) public QueryTypeEnum getQueryType() { return queryType; } @@ -2360,9 +2000,6 @@ public SearchParams removeWordsIfNoResults( * @return removeWordsIfNoResults */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Selects a strategy to remove words from the query when it doesn't match any hits." - ) public RemoveWordsIfNoResultsEnum getRemoveWordsIfNoResults() { return removeWordsIfNoResults; } @@ -2384,7 +2021,6 @@ public SearchParams advancedSyntax(Boolean advancedSyntax) { * @return advancedSyntax */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables the advanced query syntax.") public Boolean getAdvancedSyntax() { return advancedSyntax; } @@ -2412,9 +2048,6 @@ public SearchParams addOptionalWordsItem(String optionalWordsItem) { * @return optionalWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A list of words that should be considered as optional when found in the query." - ) public List getOptionalWords() { return optionalWords; } @@ -2446,9 +2079,6 @@ public SearchParams addDisableExactOnAttributesItem( * @return disableExactOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable the exact ranking criterion." - ) public List getDisableExactOnAttributes() { return disableExactOnAttributes; } @@ -2472,10 +2102,6 @@ public SearchParams exactOnSingleWordQuery( * @return exactOnSingleWordQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls how the exact ranking criterion is computed when the query contains only one" + - " word." - ) public ExactOnSingleWordQueryEnum getExactOnSingleWordQuery() { return exactOnSingleWordQuery; } @@ -2509,10 +2135,6 @@ public SearchParams addAlternativesAsExactItem( * @return alternativesAsExact */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of alternatives that should be considered an exact match by the exact ranking" + - " criterion." - ) public List getAlternativesAsExact() { return alternativesAsExact; } @@ -2547,10 +2169,6 @@ public SearchParams addAdvancedSyntaxFeaturesItem( * @return advancedSyntaxFeatures */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is" + - " enabled." - ) public List getAdvancedSyntaxFeatures() { return advancedSyntaxFeatures; } @@ -2572,7 +2190,6 @@ public SearchParams distinct(Integer distinct) { * @return distinct */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables de-duplication or grouping of results.") public Integer getDistinct() { return distinct; } @@ -2592,9 +2209,6 @@ public SearchParams synonyms(Boolean synonyms) { * @return synonyms */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to take into account an index's synonyms for a particular search." - ) public Boolean getSynonyms() { return synonyms; } @@ -2617,10 +2231,6 @@ public SearchParams replaceSynonymsInHighlight( * @return replaceSynonymsInHighlight */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to highlight and snippet the original word that matches the synonym or the" + - " synonym itself." - ) public Boolean getReplaceSynonymsInHighlight() { return replaceSynonymsInHighlight; } @@ -2642,7 +2252,6 @@ public SearchParams minProximity(Integer minProximity) { * @return minProximity */ @javax.annotation.Nullable - @ApiModelProperty(value = "Precision of the proximity ranking criterion.") public Integer getMinProximity() { return minProximity; } @@ -2671,10 +2280,6 @@ public SearchParams addResponseFieldsItem(String responseFieldsItem) { * @return responseFields */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Choose which fields to return in the API response. This parameters applies to search and" + - " browse queries." - ) public List getResponseFields() { return responseFields; } @@ -2695,10 +2300,6 @@ public SearchParams maxFacetHits(Integer maxFacetHits) { * @return maxFacetHits */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet hits to return during a search for facet values. For performance" + - " reasons, the maximum allowed number of returned values is 100." - ) public Integer getMaxFacetHits() { return maxFacetHits; } @@ -2722,10 +2323,6 @@ public SearchParams attributeCriteriaComputedByMinProximity( * @return attributeCriteriaComputedByMinProximity */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When attribute is ranked above proximity in your ranking formula, proximity is used to" + - " select which searchable attribute is matched in the attribute ranking stage." - ) public Boolean getAttributeCriteriaComputedByMinProximity() { return attributeCriteriaComputedByMinProximity; } @@ -2749,10 +2346,6 @@ public SearchParams renderingContent(Object renderingContent) { * @return renderingContent */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Content defining how the search interface should be rendered. Can be set via the" + - " settings for a default value and can be overridden via rules." - ) public Object getRenderingContent() { return renderingContent; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java index 603d3faa5cf..809d052c96c 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java @@ -5,7 +5,6 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -17,282 +16,154 @@ /** SearchParamsObject */ public class SearchParamsObject { - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_SIMILAR_QUERY = "similarQuery"; - - @SerializedName(SERIALIZED_NAME_SIMILAR_QUERY) + @SerializedName("similarQuery") private String similarQuery = ""; - public static final String SERIALIZED_NAME_FILTERS = "filters"; - - @SerializedName(SERIALIZED_NAME_FILTERS) + @SerializedName("filters") private String filters = ""; - public static final String SERIALIZED_NAME_FACET_FILTERS = "facetFilters"; - - @SerializedName(SERIALIZED_NAME_FACET_FILTERS) + @SerializedName("facetFilters") private List facetFilters = null; - public static final String SERIALIZED_NAME_OPTIONAL_FILTERS = - "optionalFilters"; - - @SerializedName(SERIALIZED_NAME_OPTIONAL_FILTERS) + @SerializedName("optionalFilters") private List optionalFilters = null; - public static final String SERIALIZED_NAME_NUMERIC_FILTERS = "numericFilters"; - - @SerializedName(SERIALIZED_NAME_NUMERIC_FILTERS) + @SerializedName("numericFilters") private List numericFilters = null; - public static final String SERIALIZED_NAME_TAG_FILTERS = "tagFilters"; - - @SerializedName(SERIALIZED_NAME_TAG_FILTERS) + @SerializedName("tagFilters") private List tagFilters = null; - public static final String SERIALIZED_NAME_SUM_OR_FILTERS_SCORES = - "sumOrFiltersScores"; - - @SerializedName(SERIALIZED_NAME_SUM_OR_FILTERS_SCORES) + @SerializedName("sumOrFiltersScores") private Boolean sumOrFiltersScores = false; - public static final String SERIALIZED_NAME_FACETS = "facets"; - - @SerializedName(SERIALIZED_NAME_FACETS) + @SerializedName("facets") private List facets = null; - public static final String SERIALIZED_NAME_MAX_VALUES_PER_FACET = - "maxValuesPerFacet"; - - @SerializedName(SERIALIZED_NAME_MAX_VALUES_PER_FACET) + @SerializedName("maxValuesPerFacet") private Integer maxValuesPerFacet = 100; - public static final String SERIALIZED_NAME_FACETING_AFTER_DISTINCT = - "facetingAfterDistinct"; - - @SerializedName(SERIALIZED_NAME_FACETING_AFTER_DISTINCT) + @SerializedName("facetingAfterDistinct") private Boolean facetingAfterDistinct = false; - public static final String SERIALIZED_NAME_SORT_FACET_VALUES_BY = - "sortFacetValuesBy"; - - @SerializedName(SERIALIZED_NAME_SORT_FACET_VALUES_BY) + @SerializedName("sortFacetValuesBy") private String sortFacetValuesBy = "count"; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_OFFSET = "offset"; - - @SerializedName(SERIALIZED_NAME_OFFSET) + @SerializedName("offset") private Integer offset; - public static final String SERIALIZED_NAME_LENGTH = "length"; - - @SerializedName(SERIALIZED_NAME_LENGTH) + @SerializedName("length") private Integer length; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG = "aroundLatLng"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG) + @SerializedName("aroundLatLng") private String aroundLatLng = ""; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG_VIA_I_P = - "aroundLatLngViaIP"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG_VIA_I_P) + @SerializedName("aroundLatLngViaIP") private Boolean aroundLatLngViaIP = false; - public static final String SERIALIZED_NAME_AROUND_RADIUS = "aroundRadius"; - - @SerializedName(SERIALIZED_NAME_AROUND_RADIUS) + @SerializedName("aroundRadius") private OneOfintegerstring aroundRadius; - public static final String SERIALIZED_NAME_AROUND_PRECISION = - "aroundPrecision"; - - @SerializedName(SERIALIZED_NAME_AROUND_PRECISION) + @SerializedName("aroundPrecision") private Integer aroundPrecision = 10; - public static final String SERIALIZED_NAME_MINIMUM_AROUND_RADIUS = - "minimumAroundRadius"; - - @SerializedName(SERIALIZED_NAME_MINIMUM_AROUND_RADIUS) + @SerializedName("minimumAroundRadius") private Integer minimumAroundRadius; - public static final String SERIALIZED_NAME_INSIDE_BOUNDING_BOX = - "insideBoundingBox"; - - @SerializedName(SERIALIZED_NAME_INSIDE_BOUNDING_BOX) + @SerializedName("insideBoundingBox") private List insideBoundingBox = null; - public static final String SERIALIZED_NAME_INSIDE_POLYGON = "insidePolygon"; - - @SerializedName(SERIALIZED_NAME_INSIDE_POLYGON) + @SerializedName("insidePolygon") private List insidePolygon = null; - public static final String SERIALIZED_NAME_NATURAL_LANGUAGES = - "naturalLanguages"; - - @SerializedName(SERIALIZED_NAME_NATURAL_LANGUAGES) + @SerializedName("naturalLanguages") private List naturalLanguages = null; - public static final String SERIALIZED_NAME_RULE_CONTEXTS = "ruleContexts"; - - @SerializedName(SERIALIZED_NAME_RULE_CONTEXTS) + @SerializedName("ruleContexts") private List ruleContexts = null; - public static final String SERIALIZED_NAME_PERSONALIZATION_IMPACT = - "personalizationImpact"; - - @SerializedName(SERIALIZED_NAME_PERSONALIZATION_IMPACT) + @SerializedName("personalizationImpact") private Integer personalizationImpact = 100; - public static final String SERIALIZED_NAME_USER_TOKEN = "userToken"; - - @SerializedName(SERIALIZED_NAME_USER_TOKEN) + @SerializedName("userToken") private String userToken; - public static final String SERIALIZED_NAME_GET_RANKING_INFO = - "getRankingInfo"; - - @SerializedName(SERIALIZED_NAME_GET_RANKING_INFO) + @SerializedName("getRankingInfo") private Boolean getRankingInfo = false; - public static final String SERIALIZED_NAME_CLICK_ANALYTICS = "clickAnalytics"; - - @SerializedName(SERIALIZED_NAME_CLICK_ANALYTICS) + @SerializedName("clickAnalytics") private Boolean clickAnalytics = false; - public static final String SERIALIZED_NAME_ANALYTICS = "analytics"; - - @SerializedName(SERIALIZED_NAME_ANALYTICS) + @SerializedName("analytics") private Boolean analytics = true; - public static final String SERIALIZED_NAME_ANALYTICS_TAGS = "analyticsTags"; - - @SerializedName(SERIALIZED_NAME_ANALYTICS_TAGS) + @SerializedName("analyticsTags") private List analyticsTags = null; - public static final String SERIALIZED_NAME_PERCENTILE_COMPUTATION = - "percentileComputation"; - - @SerializedName(SERIALIZED_NAME_PERCENTILE_COMPUTATION) + @SerializedName("percentileComputation") private Boolean percentileComputation = true; - public static final String SERIALIZED_NAME_ENABLE_A_B_TEST = "enableABTest"; - - @SerializedName(SERIALIZED_NAME_ENABLE_A_B_TEST) + @SerializedName("enableABTest") private Boolean enableABTest = true; - public static final String SERIALIZED_NAME_ENABLE_RE_RANKING = - "enableReRanking"; - - @SerializedName(SERIALIZED_NAME_ENABLE_RE_RANKING) + @SerializedName("enableReRanking") private Boolean enableReRanking = true; - public static final String SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES = - "searchableAttributes"; - - @SerializedName(SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES) + @SerializedName("searchableAttributes") private List searchableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING = - "attributesForFaceting"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_FOR_FACETING) + @SerializedName("attributesForFaceting") private List attributesForFaceting = null; - public static final String SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES = - "unretrievableAttributes"; - - @SerializedName(SERIALIZED_NAME_UNRETRIEVABLE_ATTRIBUTES) + @SerializedName("unretrievableAttributes") private List unretrievableAttributes = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE = - "attributesToRetrieve"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_RETRIEVE) + @SerializedName("attributesToRetrieve") private List attributesToRetrieve = null; - public static final String SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES = - "restrictSearchableAttributes"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_SEARCHABLE_ATTRIBUTES) + @SerializedName("restrictSearchableAttributes") private List restrictSearchableAttributes = null; - public static final String SERIALIZED_NAME_RANKING = "ranking"; - - @SerializedName(SERIALIZED_NAME_RANKING) + @SerializedName("ranking") private List ranking = null; - public static final String SERIALIZED_NAME_CUSTOM_RANKING = "customRanking"; - - @SerializedName(SERIALIZED_NAME_CUSTOM_RANKING) + @SerializedName("customRanking") private List customRanking = null; - public static final String SERIALIZED_NAME_RELEVANCY_STRICTNESS = - "relevancyStrictness"; - - @SerializedName(SERIALIZED_NAME_RELEVANCY_STRICTNESS) + @SerializedName("relevancyStrictness") private Integer relevancyStrictness = 100; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT = - "attributesToHighlight"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_HIGHLIGHT) + @SerializedName("attributesToHighlight") private List attributesToHighlight = null; - public static final String SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET = - "attributesToSnippet"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTES_TO_SNIPPET) + @SerializedName("attributesToSnippet") private List attributesToSnippet = null; - public static final String SERIALIZED_NAME_HIGHLIGHT_PRE_TAG = - "highlightPreTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_PRE_TAG) + @SerializedName("highlightPreTag") private String highlightPreTag = ""; - public static final String SERIALIZED_NAME_HIGHLIGHT_POST_TAG = - "highlightPostTag"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_POST_TAG) + @SerializedName("highlightPostTag") private String highlightPostTag = ""; - public static final String SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT = - "snippetEllipsisText"; - - @SerializedName(SERIALIZED_NAME_SNIPPET_ELLIPSIS_TEXT) + @SerializedName("snippetEllipsisText") private String snippetEllipsisText = "…"; - public static final String SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS = - "restrictHighlightAndSnippetArrays"; - - @SerializedName(SERIALIZED_NAME_RESTRICT_HIGHLIGHT_AND_SNIPPET_ARRAYS) + @SerializedName("restrictHighlightAndSnippetArrays") private Boolean restrictHighlightAndSnippetArrays = false; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO = - "minWordSizefor1Typo"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR1_TYPO) + @SerializedName("minWordSizefor1Typo") private Integer minWordSizefor1Typo = 4; - public static final String SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS = - "minWordSizefor2Typos"; - - @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS) + @SerializedName("minWordSizefor2Typos") private Integer minWordSizefor2Typos = 8; /** Controls whether typo tolerance is enabled and how it is applied. */ @@ -349,66 +220,37 @@ public TypoToleranceEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_TYPO_TOLERANCE = "typoTolerance"; - - @SerializedName(SERIALIZED_NAME_TYPO_TOLERANCE) + @SerializedName("typoTolerance") private TypoToleranceEnum typoTolerance = TypoToleranceEnum.TRUE; - public static final String SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS = - "allowTyposOnNumericTokens"; - - @SerializedName(SERIALIZED_NAME_ALLOW_TYPOS_ON_NUMERIC_TOKENS) + @SerializedName("allowTyposOnNumericTokens") private Boolean allowTyposOnNumericTokens = true; - public static final String SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES = - "disableTypoToleranceOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES) + @SerializedName("disableTypoToleranceOnAttributes") private List disableTypoToleranceOnAttributes = null; - public static final String SERIALIZED_NAME_SEPARATORS_TO_INDEX = - "separatorsToIndex"; - - @SerializedName(SERIALIZED_NAME_SEPARATORS_TO_INDEX) + @SerializedName("separatorsToIndex") private String separatorsToIndex = ""; - public static final String SERIALIZED_NAME_IGNORE_PLURALS = "ignorePlurals"; - - @SerializedName(SERIALIZED_NAME_IGNORE_PLURALS) + @SerializedName("ignorePlurals") private String ignorePlurals = "false"; - public static final String SERIALIZED_NAME_REMOVE_STOP_WORDS = - "removeStopWords"; - - @SerializedName(SERIALIZED_NAME_REMOVE_STOP_WORDS) + @SerializedName("removeStopWords") private String removeStopWords = "false"; - public static final String SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS = - "keepDiacriticsOnCharacters"; - - @SerializedName(SERIALIZED_NAME_KEEP_DIACRITICS_ON_CHARACTERS) + @SerializedName("keepDiacriticsOnCharacters") private String keepDiacriticsOnCharacters = ""; - public static final String SERIALIZED_NAME_QUERY_LANGUAGES = "queryLanguages"; - - @SerializedName(SERIALIZED_NAME_QUERY_LANGUAGES) + @SerializedName("queryLanguages") private List queryLanguages = null; - public static final String SERIALIZED_NAME_DECOMPOUND_QUERY = - "decompoundQuery"; - - @SerializedName(SERIALIZED_NAME_DECOMPOUND_QUERY) + @SerializedName("decompoundQuery") private Boolean decompoundQuery = true; - public static final String SERIALIZED_NAME_ENABLE_RULES = "enableRules"; - - @SerializedName(SERIALIZED_NAME_ENABLE_RULES) + @SerializedName("enableRules") private Boolean enableRules = true; - public static final String SERIALIZED_NAME_ENABLE_PERSONALIZATION = - "enablePersonalization"; - - @SerializedName(SERIALIZED_NAME_ENABLE_PERSONALIZATION) + @SerializedName("enablePersonalization") private Boolean enablePersonalization = false; /** Controls if and how query words are interpreted as prefixes. */ @@ -463,9 +305,7 @@ public QueryTypeEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_QUERY_TYPE = "queryType"; - - @SerializedName(SERIALIZED_NAME_QUERY_TYPE) + @SerializedName("queryType") private QueryTypeEnum queryType = QueryTypeEnum.PREFIXLAST; /** Selects a strategy to remove words from the query when it doesn't match any hits. */ @@ -523,27 +363,17 @@ public RemoveWordsIfNoResultsEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS = - "removeWordsIfNoResults"; - - @SerializedName(SERIALIZED_NAME_REMOVE_WORDS_IF_NO_RESULTS) + @SerializedName("removeWordsIfNoResults") private RemoveWordsIfNoResultsEnum removeWordsIfNoResults = RemoveWordsIfNoResultsEnum.NONE; - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX = "advancedSyntax"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX) + @SerializedName("advancedSyntax") private Boolean advancedSyntax = false; - public static final String SERIALIZED_NAME_OPTIONAL_WORDS = "optionalWords"; - - @SerializedName(SERIALIZED_NAME_OPTIONAL_WORDS) + @SerializedName("optionalWords") private List optionalWords = null; - public static final String SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES = - "disableExactOnAttributes"; - - @SerializedName(SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES) + @SerializedName("disableExactOnAttributes") private List disableExactOnAttributes = null; /** Controls how the exact ranking criterion is computed when the query contains only one word. */ @@ -599,10 +429,7 @@ public ExactOnSingleWordQueryEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY = - "exactOnSingleWordQuery"; - - @SerializedName(SERIALIZED_NAME_EXACT_ON_SINGLE_WORD_QUERY) + @SerializedName("exactOnSingleWordQuery") private ExactOnSingleWordQueryEnum exactOnSingleWordQuery = ExactOnSingleWordQueryEnum.ATTRIBUTE; @@ -658,10 +485,7 @@ public AlternativesAsExactEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ALTERNATIVES_AS_EXACT = - "alternativesAsExact"; - - @SerializedName(SERIALIZED_NAME_ALTERNATIVES_AS_EXACT) + @SerializedName("alternativesAsExact") private List alternativesAsExact = null; /** Gets or Sets advancedSyntaxFeatures */ @@ -715,53 +539,31 @@ public AdvancedSyntaxFeaturesEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES = - "advancedSyntaxFeatures"; - - @SerializedName(SERIALIZED_NAME_ADVANCED_SYNTAX_FEATURES) + @SerializedName("advancedSyntaxFeatures") private List advancedSyntaxFeatures = null; - public static final String SERIALIZED_NAME_DISTINCT = "distinct"; - - @SerializedName(SERIALIZED_NAME_DISTINCT) + @SerializedName("distinct") private Integer distinct = 0; - public static final String SERIALIZED_NAME_SYNONYMS = "synonyms"; - - @SerializedName(SERIALIZED_NAME_SYNONYMS) + @SerializedName("synonyms") private Boolean synonyms = true; - public static final String SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT = - "replaceSynonymsInHighlight"; - - @SerializedName(SERIALIZED_NAME_REPLACE_SYNONYMS_IN_HIGHLIGHT) + @SerializedName("replaceSynonymsInHighlight") private Boolean replaceSynonymsInHighlight = false; - public static final String SERIALIZED_NAME_MIN_PROXIMITY = "minProximity"; - - @SerializedName(SERIALIZED_NAME_MIN_PROXIMITY) + @SerializedName("minProximity") private Integer minProximity = 1; - public static final String SERIALIZED_NAME_RESPONSE_FIELDS = "responseFields"; - - @SerializedName(SERIALIZED_NAME_RESPONSE_FIELDS) + @SerializedName("responseFields") private List responseFields = null; - public static final String SERIALIZED_NAME_MAX_FACET_HITS = "maxFacetHits"; - - @SerializedName(SERIALIZED_NAME_MAX_FACET_HITS) + @SerializedName("maxFacetHits") private Integer maxFacetHits = 10; - public static final String SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY = - "attributeCriteriaComputedByMinProximity"; - - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_CRITERIA_COMPUTED_BY_MIN_PROXIMITY) + @SerializedName("attributeCriteriaComputedByMinProximity") private Boolean attributeCriteriaComputedByMinProximity = false; - public static final String SERIALIZED_NAME_RENDERING_CONTENT = - "renderingContent"; - - @SerializedName(SERIALIZED_NAME_RENDERING_CONTENT) + @SerializedName("renderingContent") private Object renderingContent = new Object(); public SearchParamsObject query(String query) { @@ -775,7 +577,6 @@ public SearchParamsObject query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { return query; } @@ -796,10 +597,6 @@ public SearchParamsObject similarQuery(String similarQuery) { * @return similarQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Overrides the query parameter and performs a more generic search that can be used to" + - " find \"similar\" results." - ) public String getSimilarQuery() { return similarQuery; } @@ -819,9 +616,6 @@ public SearchParamsObject filters(String filters) { * @return filters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Filter the query with numeric, facet and/or tag filters." - ) public String getFilters() { return filters; } @@ -849,7 +643,6 @@ public SearchParamsObject addFacetFiltersItem(String facetFiltersItem) { * @return facetFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter hits by facet value.") public List getFacetFilters() { return facetFilters; } @@ -878,10 +671,6 @@ public SearchParamsObject addOptionalFiltersItem(String optionalFiltersItem) { * @return optionalFilters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Create filters for ranking purposes, where records that match the filter are ranked" + - " higher, or lower in the case of a negative optional filter." - ) public List getOptionalFilters() { return optionalFilters; } @@ -909,7 +698,6 @@ public SearchParamsObject addNumericFiltersItem(String numericFiltersItem) { * @return numericFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter on numeric attributes.") public List getNumericFilters() { return numericFilters; } @@ -937,7 +725,6 @@ public SearchParamsObject addTagFiltersItem(String tagFiltersItem) { * @return tagFilters */ @javax.annotation.Nullable - @ApiModelProperty(value = "Filter hits by tags.") public List getTagFilters() { return tagFilters; } @@ -957,9 +744,6 @@ public SearchParamsObject sumOrFiltersScores(Boolean sumOrFiltersScores) { * @return sumOrFiltersScores */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Determines how to calculate the total score for filtering." - ) public Boolean getSumOrFiltersScores() { return sumOrFiltersScores; } @@ -987,7 +771,6 @@ public SearchParamsObject addFacetsItem(String facetsItem) { * @return facets */ @javax.annotation.Nullable - @ApiModelProperty(value = "Retrieve facets and their facet values.") public List getFacets() { return facets; } @@ -1007,9 +790,6 @@ public SearchParamsObject maxValuesPerFacet(Integer maxValuesPerFacet) { * @return maxValuesPerFacet */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet values to return for each facet during a regular search." - ) public Integer getMaxValuesPerFacet() { return maxValuesPerFacet; } @@ -1031,9 +811,6 @@ public SearchParamsObject facetingAfterDistinct( * @return facetingAfterDistinct */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Force faceting to be applied after de-duplication (via the Distinct setting)." - ) public Boolean getFacetingAfterDistinct() { return facetingAfterDistinct; } @@ -1053,7 +830,6 @@ public SearchParamsObject sortFacetValuesBy(String sortFacetValuesBy) { * @return sortFacetValuesBy */ @javax.annotation.Nullable - @ApiModelProperty(value = "Controls how facet values are fetched.") public String getSortFacetValuesBy() { return sortFacetValuesBy; } @@ -1073,7 +849,6 @@ public SearchParamsObject page(Integer page) { * @return page */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -1093,7 +868,6 @@ public SearchParamsObject offset(Integer offset) { * @return offset */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the offset of the first hit to return.") public Integer getOffset() { return offset; } @@ -1113,9 +887,6 @@ public SearchParamsObject length(Integer length) { * @return length */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Set the number of hits to retrieve (used only with offset)." - ) public Integer getLength() { return length; } @@ -1135,10 +906,6 @@ public SearchParamsObject aroundLatLng(String aroundLatLng) { * @return aroundLatLng */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search for entries around a central geolocation, enabling a geo search within a circular" + - " area." - ) public String getAroundLatLng() { return aroundLatLng; } @@ -1159,10 +926,6 @@ public SearchParamsObject aroundLatLngViaIP(Boolean aroundLatLngViaIP) { * @return aroundLatLngViaIP */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search for entries around a given location automatically computed from the requester's" + - " IP address." - ) public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; } @@ -1182,9 +945,6 @@ public SearchParamsObject aroundRadius(OneOfintegerstring aroundRadius) { * @return aroundRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Define the maximum radius for a geo search (in meters)." - ) public OneOfintegerstring getAroundRadius() { return aroundRadius; } @@ -1204,10 +964,6 @@ public SearchParamsObject aroundPrecision(Integer aroundPrecision) { * @return aroundPrecision */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Precision of geo search (in meters), to add grouping by geo location to the ranking" + - " formula." - ) public Integer getAroundPrecision() { return aroundPrecision; } @@ -1227,9 +983,6 @@ public SearchParamsObject minimumAroundRadius(Integer minimumAroundRadius) { * @return minimumAroundRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum radius (in meters) used for a geo search when aroundRadius is not set." - ) public Integer getMinimumAroundRadius() { return minimumAroundRadius; } @@ -1261,9 +1014,6 @@ public SearchParamsObject addInsideBoundingBoxItem( * @return insideBoundingBox */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Search inside a rectangular area (in geo coordinates)." - ) public List getInsideBoundingBox() { return insideBoundingBox; } @@ -1291,7 +1041,6 @@ public SearchParamsObject addInsidePolygonItem(BigDecimal insidePolygonItem) { * @return insidePolygon */ @javax.annotation.Nullable - @ApiModelProperty(value = "Search inside a polygon (in geo coordinates).") public List getInsidePolygon() { return insidePolygon; } @@ -1325,13 +1074,6 @@ public SearchParamsObject addNaturalLanguagesItem( * @return naturalLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This parameter changes the default values of certain parameters and settings that work" + - " best for a natural language query, such as ignorePlurals, removeStopWords," + - " removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and" + - " settings work well together when the query is formatted in natural language" + - " instead of keywords, for example when your user performs a voice search." - ) public List getNaturalLanguages() { return naturalLanguages; } @@ -1359,7 +1101,6 @@ public SearchParamsObject addRuleContextsItem(String ruleContextsItem) { * @return ruleContexts */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables contextual rules.") public List getRuleContexts() { return ruleContexts; } @@ -1381,7 +1122,6 @@ public SearchParamsObject personalizationImpact( * @return personalizationImpact */ @javax.annotation.Nullable - @ApiModelProperty(value = "Define the impact of the Personalization feature.") public Integer getPersonalizationImpact() { return personalizationImpact; } @@ -1401,9 +1141,6 @@ public SearchParamsObject userToken(String userToken) { * @return userToken */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Associates a certain user token with the current search." - ) public String getUserToken() { return userToken; } @@ -1423,7 +1160,6 @@ public SearchParamsObject getRankingInfo(Boolean getRankingInfo) { * @return getRankingInfo */ @javax.annotation.Nullable - @ApiModelProperty(value = "Retrieve detailed ranking information.") public Boolean getGetRankingInfo() { return getRankingInfo; } @@ -1443,7 +1179,6 @@ public SearchParamsObject clickAnalytics(Boolean clickAnalytics) { * @return clickAnalytics */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enable the Click Analytics feature.") public Boolean getClickAnalytics() { return clickAnalytics; } @@ -1463,9 +1198,6 @@ public SearchParamsObject analytics(Boolean analytics) { * @return analytics */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the current query will be taken into account in the Analytics." - ) public Boolean getAnalytics() { return analytics; } @@ -1493,9 +1225,6 @@ public SearchParamsObject addAnalyticsTagsItem(String analyticsTagsItem) { * @return analyticsTags */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of tags to apply to the query for analytics purposes." - ) public List getAnalyticsTags() { return analyticsTags; } @@ -1517,9 +1246,6 @@ public SearchParamsObject percentileComputation( * @return percentileComputation */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to include or exclude a query from the processing-time percentile computation." - ) public Boolean getPercentileComputation() { return percentileComputation; } @@ -1539,9 +1265,6 @@ public SearchParamsObject enableABTest(Boolean enableABTest) { * @return enableABTest */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether this search should participate in running AB tests." - ) public Boolean getEnableABTest() { return enableABTest; } @@ -1561,7 +1284,6 @@ public SearchParamsObject enableReRanking(Boolean enableReRanking) { * @return enableReRanking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether this search should use AI Re-Ranking.") public Boolean getEnableReRanking() { return enableReRanking; } @@ -1593,9 +1315,6 @@ public SearchParamsObject addSearchableAttributesItem( * @return searchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes used for searching." - ) public List getSearchableAttributes() { return searchableAttributes; } @@ -1627,9 +1346,6 @@ public SearchParamsObject addAttributesForFacetingItem( * @return attributesForFaceting */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The complete list of attributes that will be used for faceting." - ) public List getAttributesForFaceting() { return attributesForFaceting; } @@ -1661,9 +1377,6 @@ public SearchParamsObject addUnretrievableAttributesItem( * @return unretrievableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes that can't be retrieved at query time." - ) public List getUnretrievableAttributes() { return unretrievableAttributes; } @@ -1695,9 +1408,6 @@ public SearchParamsObject addAttributesToRetrieveItem( * @return attributesToRetrieve */ @javax.annotation.Nullable - @ApiModelProperty( - value = "This parameter controls which attributes to retrieve and which not to retrieve." - ) public List getAttributesToRetrieve() { return attributesToRetrieve; } @@ -1729,9 +1439,6 @@ public SearchParamsObject addRestrictSearchableAttributesItem( * @return restrictSearchableAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restricts a given query to look in only a subset of your searchable attributes." - ) public List getRestrictSearchableAttributes() { return restrictSearchableAttributes; } @@ -1761,7 +1468,6 @@ public SearchParamsObject addRankingItem(String rankingItem) { * @return ranking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Controls how Algolia should sort your results.") public List getRanking() { return ranking; } @@ -1789,7 +1495,6 @@ public SearchParamsObject addCustomRankingItem(String customRankingItem) { * @return customRanking */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specifies the custom ranking criterion.") public List getCustomRanking() { return customRanking; } @@ -1810,10 +1515,6 @@ public SearchParamsObject relevancyStrictness(Integer relevancyStrictness) { * @return relevancyStrictness */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls the relevancy threshold below which less relevant results aren't included in" + - " the results." - ) public Integer getRelevancyStrictness() { return relevancyStrictness; } @@ -1845,7 +1546,6 @@ public SearchParamsObject addAttributesToHighlightItem( * @return attributesToHighlight */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of attributes to highlight.") public List getAttributesToHighlight() { return attributesToHighlight; } @@ -1877,9 +1577,6 @@ public SearchParamsObject addAttributesToSnippetItem( * @return attributesToSnippet */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes to snippet, with an optional maximum number of words to snippet." - ) public List getAttributesToSnippet() { return attributesToSnippet; } @@ -1899,10 +1596,6 @@ public SearchParamsObject highlightPreTag(String highlightPreTag) { * @return highlightPreTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert before the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPreTag() { return highlightPreTag; } @@ -1922,10 +1615,6 @@ public SearchParamsObject highlightPostTag(String highlightPostTag) { * @return highlightPostTag */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The HTML string to insert after the highlighted parts in all highlight and snippet" + - " results." - ) public String getHighlightPostTag() { return highlightPostTag; } @@ -1945,9 +1634,6 @@ public SearchParamsObject snippetEllipsisText(String snippetEllipsisText) { * @return snippetEllipsisText */ @javax.annotation.Nullable - @ApiModelProperty( - value = "String used as an ellipsis indicator when a snippet is truncated." - ) public String getSnippetEllipsisText() { return snippetEllipsisText; } @@ -1969,9 +1655,6 @@ public SearchParamsObject restrictHighlightAndSnippetArrays( * @return restrictHighlightAndSnippetArrays */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restrict highlighting and snippeting to items that matched the query." - ) public Boolean getRestrictHighlightAndSnippetArrays() { return restrictHighlightAndSnippetArrays; } @@ -1993,7 +1676,6 @@ public SearchParamsObject hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -2014,10 +1696,6 @@ public SearchParamsObject minWordSizefor1Typo(Integer minWordSizefor1Typo) { * @return minWordSizefor1Typo */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 1 typo." - ) public Integer getMinWordSizefor1Typo() { return minWordSizefor1Typo; } @@ -2038,10 +1716,6 @@ public SearchParamsObject minWordSizefor2Typos(Integer minWordSizefor2Typos) { * @return minWordSizefor2Typos */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Minimum number of characters a word in the query string must contain to accept matches" + - " with 2 typos." - ) public Integer getMinWordSizefor2Typos() { return minWordSizefor2Typos; } @@ -2061,9 +1735,6 @@ public SearchParamsObject typoTolerance(TypoToleranceEnum typoTolerance) { * @return typoTolerance */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls whether typo tolerance is enabled and how it is applied." - ) public TypoToleranceEnum getTypoTolerance() { return typoTolerance; } @@ -2085,9 +1756,6 @@ public SearchParamsObject allowTyposOnNumericTokens( * @return allowTyposOnNumericTokens */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to allow typos on numbers (\"numeric tokens\") in the query string." - ) public Boolean getAllowTyposOnNumericTokens() { return allowTyposOnNumericTokens; } @@ -2121,9 +1789,6 @@ public SearchParamsObject addDisableTypoToleranceOnAttributesItem( * @return disableTypoToleranceOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable typo tolerance." - ) public List getDisableTypoToleranceOnAttributes() { return disableTypoToleranceOnAttributes; } @@ -2145,7 +1810,6 @@ public SearchParamsObject separatorsToIndex(String separatorsToIndex) { * @return separatorsToIndex */ @javax.annotation.Nullable - @ApiModelProperty(value = "Control which separators are indexed.") public String getSeparatorsToIndex() { return separatorsToIndex; } @@ -2165,9 +1829,6 @@ public SearchParamsObject ignorePlurals(String ignorePlurals) { * @return ignorePlurals */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Treats singular, plurals, and other forms of declensions as matching terms." - ) public String getIgnorePlurals() { return ignorePlurals; } @@ -2187,9 +1848,6 @@ public SearchParamsObject removeStopWords(String removeStopWords) { * @return removeStopWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Removes stop (common) words from the query before executing it." - ) public String getRemoveStopWords() { return removeStopWords; } @@ -2211,9 +1869,6 @@ public SearchParamsObject keepDiacriticsOnCharacters( * @return keepDiacriticsOnCharacters */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of characters that the engine shouldn't automatically normalize." - ) public String getKeepDiacriticsOnCharacters() { return keepDiacriticsOnCharacters; } @@ -2242,10 +1897,6 @@ public SearchParamsObject addQueryLanguagesItem(String queryLanguagesItem) { * @return queryLanguages */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Sets the languages to be used by language-specific settings and functionalities such as" + - " ignorePlurals, removeStopWords, and CJK word-detection." - ) public List getQueryLanguages() { return queryLanguages; } @@ -2265,9 +1916,6 @@ public SearchParamsObject decompoundQuery(Boolean decompoundQuery) { * @return decompoundQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Splits compound words into their composing atoms in the query." - ) public Boolean getDecompoundQuery() { return decompoundQuery; } @@ -2287,7 +1935,6 @@ public SearchParamsObject enableRules(Boolean enableRules) { * @return enableRules */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether Rules should be globally enabled.") public Boolean getEnableRules() { return enableRules; } @@ -2309,7 +1956,6 @@ public SearchParamsObject enablePersonalization( * @return enablePersonalization */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enable the Personalization feature.") public Boolean getEnablePersonalization() { return enablePersonalization; } @@ -2329,9 +1975,6 @@ public SearchParamsObject queryType(QueryTypeEnum queryType) { * @return queryType */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls if and how query words are interpreted as prefixes." - ) public QueryTypeEnum getQueryType() { return queryType; } @@ -2353,9 +1996,6 @@ public SearchParamsObject removeWordsIfNoResults( * @return removeWordsIfNoResults */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Selects a strategy to remove words from the query when it doesn't match any hits." - ) public RemoveWordsIfNoResultsEnum getRemoveWordsIfNoResults() { return removeWordsIfNoResults; } @@ -2377,7 +2017,6 @@ public SearchParamsObject advancedSyntax(Boolean advancedSyntax) { * @return advancedSyntax */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables the advanced query syntax.") public Boolean getAdvancedSyntax() { return advancedSyntax; } @@ -2405,9 +2044,6 @@ public SearchParamsObject addOptionalWordsItem(String optionalWordsItem) { * @return optionalWords */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A list of words that should be considered as optional when found in the query." - ) public List getOptionalWords() { return optionalWords; } @@ -2439,9 +2075,6 @@ public SearchParamsObject addDisableExactOnAttributesItem( * @return disableExactOnAttributes */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of attributes on which you want to disable the exact ranking criterion." - ) public List getDisableExactOnAttributes() { return disableExactOnAttributes; } @@ -2465,10 +2098,6 @@ public SearchParamsObject exactOnSingleWordQuery( * @return exactOnSingleWordQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Controls how the exact ranking criterion is computed when the query contains only one" + - " word." - ) public ExactOnSingleWordQueryEnum getExactOnSingleWordQuery() { return exactOnSingleWordQuery; } @@ -2502,10 +2131,6 @@ public SearchParamsObject addAlternativesAsExactItem( * @return alternativesAsExact */ @javax.annotation.Nullable - @ApiModelProperty( - value = "List of alternatives that should be considered an exact match by the exact ranking" + - " criterion." - ) public List getAlternativesAsExact() { return alternativesAsExact; } @@ -2540,10 +2165,6 @@ public SearchParamsObject addAdvancedSyntaxFeaturesItem( * @return advancedSyntaxFeatures */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is" + - " enabled." - ) public List getAdvancedSyntaxFeatures() { return advancedSyntaxFeatures; } @@ -2565,7 +2186,6 @@ public SearchParamsObject distinct(Integer distinct) { * @return distinct */ @javax.annotation.Nullable - @ApiModelProperty(value = "Enables de-duplication or grouping of results.") public Integer getDistinct() { return distinct; } @@ -2585,9 +2205,6 @@ public SearchParamsObject synonyms(Boolean synonyms) { * @return synonyms */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to take into account an index's synonyms for a particular search." - ) public Boolean getSynonyms() { return synonyms; } @@ -2610,10 +2227,6 @@ public SearchParamsObject replaceSynonymsInHighlight( * @return replaceSynonymsInHighlight */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether to highlight and snippet the original word that matches the synonym or the" + - " synonym itself." - ) public Boolean getReplaceSynonymsInHighlight() { return replaceSynonymsInHighlight; } @@ -2635,7 +2248,6 @@ public SearchParamsObject minProximity(Integer minProximity) { * @return minProximity */ @javax.annotation.Nullable - @ApiModelProperty(value = "Precision of the proximity ranking criterion.") public Integer getMinProximity() { return minProximity; } @@ -2664,10 +2276,6 @@ public SearchParamsObject addResponseFieldsItem(String responseFieldsItem) { * @return responseFields */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Choose which fields to return in the API response. This parameters applies to search and" + - " browse queries." - ) public List getResponseFields() { return responseFields; } @@ -2688,10 +2296,6 @@ public SearchParamsObject maxFacetHits(Integer maxFacetHits) { * @return maxFacetHits */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of facet hits to return during a search for facet values. For performance" + - " reasons, the maximum allowed number of returned values is 100." - ) public Integer getMaxFacetHits() { return maxFacetHits; } @@ -2715,10 +2319,6 @@ public SearchParamsObject attributeCriteriaComputedByMinProximity( * @return attributeCriteriaComputedByMinProximity */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When attribute is ranked above proximity in your ranking formula, proximity is used to" + - " select which searchable attribute is matched in the attribute ranking stage." - ) public Boolean getAttributeCriteriaComputedByMinProximity() { return attributeCriteriaComputedByMinProximity; } @@ -2742,10 +2342,6 @@ public SearchParamsObject renderingContent(Object renderingContent) { * @return renderingContent */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Content defining how the search interface should be rendered. Can be set via the" + - " settings for a default value and can be overridden via rules." - ) public Object getRenderingContent() { return renderingContent; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsString.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsString.java index 9d785b1c54c..4f34f775f7e 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsString.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsString.java @@ -1,15 +1,12 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** SearchParamsString */ public class SearchParamsString { - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params = ""; public SearchParamsString params(String params) { @@ -23,7 +20,6 @@ public SearchParamsString params(String params) { * @return params */ @javax.annotation.Nullable - @ApiModelProperty(value = "Search parameters as URL-encoded query string.") public String getParams() { return params; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java index 56dd3d1d82a..7615b6914b1 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -11,135 +10,79 @@ /** SearchResponse */ public class SearchResponse { - public static final String SERIALIZED_NAME_AB_TEST_I_D = "abTestID"; - - @SerializedName(SERIALIZED_NAME_AB_TEST_I_D) + @SerializedName("abTestID") private Integer abTestID; - public static final String SERIALIZED_NAME_AB_TEST_VARIANT_I_D = - "abTestVariantID"; - - @SerializedName(SERIALIZED_NAME_AB_TEST_VARIANT_I_D) + @SerializedName("abTestVariantID") private Integer abTestVariantID; - public static final String SERIALIZED_NAME_AROUND_LAT_LNG = "aroundLatLng"; - - @SerializedName(SERIALIZED_NAME_AROUND_LAT_LNG) + @SerializedName("aroundLatLng") private String aroundLatLng; - public static final String SERIALIZED_NAME_AUTOMATIC_RADIUS = - "automaticRadius"; - - @SerializedName(SERIALIZED_NAME_AUTOMATIC_RADIUS) + @SerializedName("automaticRadius") private String automaticRadius; - public static final String SERIALIZED_NAME_EXHAUSTIVE_FACETS_COUNT = - "exhaustiveFacetsCount"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_FACETS_COUNT) + @SerializedName("exhaustiveFacetsCount") private Boolean exhaustiveFacetsCount; - public static final String SERIALIZED_NAME_EXHAUSTIVE_NB_HITS = - "exhaustiveNbHits"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_NB_HITS) + @SerializedName("exhaustiveNbHits") private Boolean exhaustiveNbHits; - public static final String SERIALIZED_NAME_EXHAUSTIVE_TYPO = "exhaustiveTypo"; - - @SerializedName(SERIALIZED_NAME_EXHAUSTIVE_TYPO) + @SerializedName("exhaustiveTypo") private Boolean exhaustiveTypo; - public static final String SERIALIZED_NAME_FACETS = "facets"; - - @SerializedName(SERIALIZED_NAME_FACETS) + @SerializedName("facets") private Map> facets = null; - public static final String SERIALIZED_NAME_FACETS_STATS = "facets_stats"; - - @SerializedName(SERIALIZED_NAME_FACETS_STATS) + @SerializedName("facets_stats") private Map facetsStats = null; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_INDEX = "index"; - - @SerializedName(SERIALIZED_NAME_INDEX) + @SerializedName("index") private String index; - public static final String SERIALIZED_NAME_INDEX_USED = "indexUsed"; - - @SerializedName(SERIALIZED_NAME_INDEX_USED) + @SerializedName("indexUsed") private String indexUsed; - public static final String SERIALIZED_NAME_MESSAGE = "message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) + @SerializedName("message") private String message; - public static final String SERIALIZED_NAME_NB_HITS = "nbHits"; - - @SerializedName(SERIALIZED_NAME_NB_HITS) + @SerializedName("nbHits") private Integer nbHits; - public static final String SERIALIZED_NAME_NB_PAGES = "nbPages"; - - @SerializedName(SERIALIZED_NAME_NB_PAGES) + @SerializedName("nbPages") private Integer nbPages; - public static final String SERIALIZED_NAME_NB_SORTED_HITS = "nbSortedHits"; - - @SerializedName(SERIALIZED_NAME_NB_SORTED_HITS) + @SerializedName("nbSortedHits") private Integer nbSortedHits; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_PARAMS = "params"; - - @SerializedName(SERIALIZED_NAME_PARAMS) + @SerializedName("params") private String params; - public static final String SERIALIZED_NAME_PARSED_QUERY = "parsedQuery"; - - @SerializedName(SERIALIZED_NAME_PARSED_QUERY) + @SerializedName("parsedQuery") private String parsedQuery; - public static final String SERIALIZED_NAME_PROCESSING_TIME_M_S = - "processingTimeMS"; - - @SerializedName(SERIALIZED_NAME_PROCESSING_TIME_M_S) + @SerializedName("processingTimeMS") private Integer processingTimeMS; - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_QUERY_AFTER_REMOVAL = - "queryAfterRemoval"; - - @SerializedName(SERIALIZED_NAME_QUERY_AFTER_REMOVAL) + @SerializedName("queryAfterRemoval") private String queryAfterRemoval; - public static final String SERIALIZED_NAME_SERVER_USED = "serverUsed"; - - @SerializedName(SERIALIZED_NAME_SERVER_USED) + @SerializedName("serverUsed") private String serverUsed; - public static final String SERIALIZED_NAME_USER_DATA = "userData"; - - @SerializedName(SERIALIZED_NAME_USER_DATA) + @SerializedName("userData") private Map userData = null; - public static final String SERIALIZED_NAME_HITS = "hits"; - - @SerializedName(SERIALIZED_NAME_HITS) + @SerializedName("hits") private List hits = new ArrayList<>(); public SearchResponse abTestID(Integer abTestID) { @@ -154,10 +97,6 @@ public SearchResponse abTestID(Integer abTestID) { * @return abTestID */ @javax.annotation.Nullable - @ApiModelProperty( - value = "If a search encounters an index that is being A/B tested, abTestID reports the ongoing" + - " A/B test ID." - ) public Integer getAbTestID() { return abTestID; } @@ -178,10 +117,6 @@ public SearchResponse abTestVariantID(Integer abTestVariantID) { * @return abTestVariantID */ @javax.annotation.Nullable - @ApiModelProperty( - value = "If a search encounters an index that is being A/B tested, abTestVariantID reports the" + - " variant ID of the index used." - ) public Integer getAbTestVariantID() { return abTestVariantID; } @@ -201,7 +136,6 @@ public SearchResponse aroundLatLng(String aroundLatLng) { * @return aroundLatLng */ @javax.annotation.Nullable - @ApiModelProperty(value = "The computed geo location.") public String getAroundLatLng() { return aroundLatLng; } @@ -222,10 +156,6 @@ public SearchResponse automaticRadius(String automaticRadius) { * @return automaticRadius */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The automatically computed radius. For legacy reasons, this parameter is a string and" + - " not an integer." - ) public String getAutomaticRadius() { return automaticRadius; } @@ -245,9 +175,6 @@ public SearchResponse exhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { * @return exhaustiveFacetsCount */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Whether the facet count is exhaustive or approximate." - ) public Boolean getExhaustiveFacetsCount() { return exhaustiveFacetsCount; } @@ -267,10 +194,6 @@ public SearchResponse exhaustiveNbHits(Boolean exhaustiveNbHits) { * @return exhaustiveNbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Indicate if the nbHits count was exhaustive or approximate" - ) public Boolean getExhaustiveNbHits() { return exhaustiveNbHits; } @@ -291,11 +214,6 @@ public SearchResponse exhaustiveTypo(Boolean exhaustiveTypo) { * @return exhaustiveTypo */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Indicate if the typo-tolerence search was exhaustive or approximate (only included when" + - " typo-tolerance is enabled)" - ) public Boolean getExhaustiveTypo() { return exhaustiveTypo; } @@ -326,10 +244,6 @@ public SearchResponse putFacetsItem( * @return facets */ @javax.annotation.Nullable - @ApiModelProperty( - example = "{\"category\":{\"food\":1,\"tech\":42}}", - value = "A mapping of each facet name to the corresponding facet counts." - ) public Map> getFacets() { return facets; } @@ -362,7 +276,6 @@ public SearchResponse putFacetsStatsItem( * @return facetsStats */ @javax.annotation.Nullable - @ApiModelProperty(value = "Statistics for numerical facets.") public Map getFacetsStats() { return facetsStats; } @@ -384,7 +297,6 @@ public SearchResponse hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } @@ -404,10 +316,6 @@ public SearchResponse index(String index) { * @return index */ @javax.annotation.Nullable - @ApiModelProperty( - example = "indexName", - value = "Index name used for the query." - ) public String getIndex() { return index; } @@ -428,11 +336,6 @@ public SearchResponse indexUsed(String indexUsed) { * @return indexUsed */ @javax.annotation.Nullable - @ApiModelProperty( - example = "indexNameAlt", - value = "Index name used for the query. In the case of an A/B test, the targeted index isn't" + - " always the index used by the query." - ) public String getIndexUsed() { return indexUsed; } @@ -452,7 +355,6 @@ public SearchResponse message(String message) { * @return message */ @javax.annotation.Nullable - @ApiModelProperty(value = "Used to return warnings about the query.") public String getMessage() { return message; } @@ -472,11 +374,6 @@ public SearchResponse nbHits(Integer nbHits) { * @return nbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Number of hits that the search query matched." - ) public Integer getNbHits() { return nbHits; } @@ -496,11 +393,6 @@ public SearchResponse nbPages(Integer nbPages) { * @return nbPages */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "1", - required = true, - value = "Number of pages available for the current query" - ) public Integer getNbPages() { return nbPages; } @@ -520,10 +412,6 @@ public SearchResponse nbSortedHits(Integer nbSortedHits) { * @return nbSortedHits */ @javax.annotation.Nullable - @ApiModelProperty( - example = "20", - value = "The number of hits selected and sorted by the relevant sort algorithm" - ) public Integer getNbSortedHits() { return nbSortedHits; } @@ -543,7 +431,6 @@ public SearchResponse page(Integer page) { * @return page */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -563,11 +450,6 @@ public SearchResponse params(String params) { * @return params */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "query=a&hitsPerPage=20", - required = true, - value = "A url-encoded string of all search parameters." - ) public String getParams() { return params; } @@ -587,9 +469,6 @@ public SearchResponse parsedQuery(String parsedQuery) { * @return parsedQuery */ @javax.annotation.Nullable - @ApiModelProperty( - value = "The query string that will be searched, after normalization." - ) public String getParsedQuery() { return parsedQuery; } @@ -609,11 +488,6 @@ public SearchResponse processingTimeMS(Integer processingTimeMS) { * @return processingTimeMS */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Time the server took to process the request, in milliseconds." - ) public Integer getProcessingTimeMS() { return processingTimeMS; } @@ -633,7 +507,6 @@ public SearchResponse query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { return query; } @@ -654,10 +527,6 @@ public SearchResponse queryAfterRemoval(String queryAfterRemoval) { * @return queryAfterRemoval */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A markup text indicating which parts of the original query have been removed in order to" + - " retrieve a non-empty result set." - ) public String getQueryAfterRemoval() { return queryAfterRemoval; } @@ -677,9 +546,6 @@ public SearchResponse serverUsed(String serverUsed) { * @return serverUsed */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Actual host name of the server that processed the request." - ) public String getServerUsed() { return serverUsed; } @@ -707,7 +573,6 @@ public SearchResponse putUserDataItem(String key, Object userDataItem) { * @return userData */ @javax.annotation.Nullable - @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { return userData; } @@ -732,7 +597,6 @@ public SearchResponse addHitsItem(Record hitsItem) { * @return hits */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public List getHits() { return hits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesParams.java index 294ef424956..070af7c23a3 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesParams.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesParams.java @@ -1,50 +1,33 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; /** Parameters for the search. */ -@ApiModel(description = "Parameters for the search.") public class SearchRulesParams { - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query = ""; - public static final String SERIALIZED_NAME_ANCHORING = "anchoring"; - - @SerializedName(SERIALIZED_NAME_ANCHORING) + @SerializedName("anchoring") private Anchoring anchoring; - public static final String SERIALIZED_NAME_CONTEXT = "context"; - - @SerializedName(SERIALIZED_NAME_CONTEXT) + @SerializedName("context") private String context; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - - @SerializedName(SERIALIZED_NAME_ENABLED) + @SerializedName("enabled") private Boolean enabled; - public static final String SERIALIZED_NAME_REQUEST_OPTIONS = "requestOptions"; - - @SerializedName(SERIALIZED_NAME_REQUEST_OPTIONS) + @SerializedName("requestOptions") private List> requestOptions = null; public SearchRulesParams query(String query) { @@ -58,7 +41,6 @@ public SearchRulesParams query(String query) { * @return query */ @javax.annotation.Nullable - @ApiModelProperty(value = "Full text query.") public String getQuery() { return query; } @@ -78,7 +60,6 @@ public SearchRulesParams anchoring(Anchoring anchoring) { * @return anchoring */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public Anchoring getAnchoring() { return anchoring; } @@ -98,9 +79,6 @@ public SearchRulesParams context(String context) { * @return context */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Restricts matches to contextual rules with a specific context (exact match)." - ) public String getContext() { return context; } @@ -120,7 +98,6 @@ public SearchRulesParams page(Integer page) { * @return page */ @javax.annotation.Nullable - @ApiModelProperty(value = "Requested page (zero-based).") public Integer getPage() { return page; } @@ -140,9 +117,6 @@ public SearchRulesParams hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Maximum number of hits in a page. Minimum is 1, maximum is 1000." - ) public Integer getHitsPerPage() { return hitsPerPage; } @@ -163,10 +137,6 @@ public SearchRulesParams enabled(Boolean enabled) { * @return enabled */ @javax.annotation.Nullable - @ApiModelProperty( - value = "When specified, restricts matches to rules with a specific enabled status. When absent" + - " (default), all rules are retrieved, regardless of their enabled status." - ) public Boolean getEnabled() { return enabled; } @@ -198,9 +168,6 @@ public SearchRulesParams addRequestOptionsItem( * @return requestOptions */ @javax.annotation.Nullable - @ApiModelProperty( - value = "A mapping of requestOptions to send along with the request." - ) public List> getRequestOptions() { return requestOptions; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesResponse.java index 28e369ac497..0d9e1f9cf12 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchRulesResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -9,24 +8,16 @@ /** SearchRulesResponse */ public class SearchRulesResponse { - public static final String SERIALIZED_NAME_HITS = "hits"; - - @SerializedName(SERIALIZED_NAME_HITS) + @SerializedName("hits") private List hits = new ArrayList<>(); - public static final String SERIALIZED_NAME_NB_HITS = "nbHits"; - - @SerializedName(SERIALIZED_NAME_NB_HITS) + @SerializedName("nbHits") private Integer nbHits; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page; - public static final String SERIALIZED_NAME_NB_PAGES = "nbPages"; - - @SerializedName(SERIALIZED_NAME_NB_PAGES) + @SerializedName("nbPages") private Integer nbPages; public SearchRulesResponse hits(List hits) { @@ -45,7 +36,6 @@ public SearchRulesResponse addHitsItem(Rule hitsItem) { * @return hits */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Fetched rules.") public List getHits() { return hits; } @@ -65,7 +55,6 @@ public SearchRulesResponse nbHits(Integer nbHits) { * @return nbHits */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Number of fetched rules.") public Integer getNbHits() { return nbHits; } @@ -85,7 +74,6 @@ public SearchRulesResponse page(Integer page) { * @return page */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Current page.") public Integer getPage() { return page; } @@ -105,7 +93,6 @@ public SearchRulesResponse nbPages(Integer nbPages) { * @return nbPages */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Number of pages.") public Integer getNbPages() { return nbPages; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchSynonymsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchSynonymsResponse.java index ea57089c759..49e1f94bf76 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchSynonymsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchSynonymsResponse.java @@ -1,7 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -10,14 +9,10 @@ /** SearchSynonymsResponse */ public class SearchSynonymsResponse extends HashMap { - public static final String SERIALIZED_NAME_HITS = "hits"; - - @SerializedName(SERIALIZED_NAME_HITS) + @SerializedName("hits") private List hits = new ArrayList<>(); - public static final String SERIALIZED_NAME_NB_HITS = "nbHits"; - - @SerializedName(SERIALIZED_NAME_NB_HITS) + @SerializedName("nbHits") private Integer nbHits; public SearchSynonymsResponse hits(List hits) { @@ -36,7 +31,6 @@ public SearchSynonymsResponse addHitsItem(SynonymHit hitsItem) { * @return hits */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Array of synonym objects.") public List getHits() { return hits; } @@ -56,11 +50,6 @@ public SearchSynonymsResponse nbHits(Integer nbHits) { * @return nbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Number of hits that the search query matched." - ) public Integer getNbHits() { return nbHits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsObject.java index d093d293312..b5dde1ccbdd 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsObject.java @@ -1,32 +1,21 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** OK */ -@ApiModel(description = "OK") public class SearchUserIdsObject { - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) + @SerializedName("query") private String query; - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) + @SerializedName("clusterName") private String clusterName; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; public SearchUserIdsObject query(String query) { @@ -41,11 +30,6 @@ public SearchUserIdsObject query(String query) { * @return query */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Query to search. The search is a prefix search with typoTolerance. Use empty query to" + - " retrieve all users." - ) public String getQuery() { return query; } @@ -65,7 +49,6 @@ public SearchUserIdsObject clusterName(String clusterName) { * @return clusterName */ @javax.annotation.Nullable - @ApiModelProperty(example = "c11-test", value = "Name of the cluster.") public String getClusterName() { return clusterName; } @@ -85,7 +68,6 @@ public SearchUserIdsObject page(Integer page) { * @return page */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -105,7 +87,6 @@ public SearchUserIdsObject hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { return hitsPerPage; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponse.java index 08ee8068bea..e60d28978b6 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponse.java @@ -1,40 +1,27 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** userIDs data. */ -@ApiModel(description = "userIDs data.") public class SearchUserIdsResponse { - public static final String SERIALIZED_NAME_HITS = "hits"; - - @SerializedName(SERIALIZED_NAME_HITS) + @SerializedName("hits") private List hits = new ArrayList<>(); - public static final String SERIALIZED_NAME_NB_HITS = "nbHits"; - - @SerializedName(SERIALIZED_NAME_NB_HITS) + @SerializedName("nbHits") private Integer nbHits; - public static final String SERIALIZED_NAME_PAGE = "page"; - - @SerializedName(SERIALIZED_NAME_PAGE) + @SerializedName("page") private Integer page = 0; - public static final String SERIALIZED_NAME_HITS_PER_PAGE = "hitsPerPage"; - - @SerializedName(SERIALIZED_NAME_HITS_PER_PAGE) + @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; public SearchUserIdsResponse hits(List hits) { @@ -53,10 +40,6 @@ public SearchUserIdsResponse addHitsItem(SearchUserIdsResponseHits hitsItem) { * @return hits */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "List of user object matching the query." - ) public List getHits() { return hits; } @@ -76,11 +59,6 @@ public SearchUserIdsResponse nbHits(Integer nbHits) { * @return nbHits */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "20", - required = true, - value = "Number of hits that the search query matched." - ) public Integer getNbHits() { return nbHits; } @@ -100,7 +78,6 @@ public SearchUserIdsResponse page(Integer page) { * @return page */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Specify the page to retrieve.") public Integer getPage() { return page; } @@ -120,10 +97,6 @@ public SearchUserIdsResponse hitsPerPage(Integer hitsPerPage) { * @return hitsPerPage */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Maximum number of hits in a page. Minimum is 1, maximum is 1000." - ) public Integer getHitsPerPage() { return hitsPerPage; } @@ -143,10 +116,6 @@ public SearchUserIdsResponse updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of last update (ISO-8601 format)." - ) public OffsetDateTime getUpdatedAt() { return updatedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHighlightResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHighlightResult.java index 09651a2ea8f..0b030d0870b 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHighlightResult.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHighlightResult.java @@ -1,20 +1,15 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** SearchUserIdsResponseHighlightResult */ public class SearchUserIdsResponseHighlightResult { - public static final String SERIALIZED_NAME_USER_I_D = "userID"; - - @SerializedName(SERIALIZED_NAME_USER_I_D) + @SerializedName("userID") private HighlightResult userID; - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) + @SerializedName("clusterName") private HighlightResult clusterName; public SearchUserIdsResponseHighlightResult userID(HighlightResult userID) { @@ -28,7 +23,6 @@ public SearchUserIdsResponseHighlightResult userID(HighlightResult userID) { * @return userID */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public HighlightResult getUserID() { return userID; } @@ -50,7 +44,6 @@ public SearchUserIdsResponseHighlightResult clusterName( * @return clusterName */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public HighlightResult getClusterName() { return clusterName; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHits.java index 36d76eac7c7..123a3a2e5a5 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHits.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsResponseHits.java @@ -1,41 +1,27 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** SearchUserIdsResponseHits */ public class SearchUserIdsResponseHits { - public static final String SERIALIZED_NAME_USER_I_D = "userID"; - - @SerializedName(SERIALIZED_NAME_USER_I_D) + @SerializedName("userID") private UserId userID; - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) + @SerializedName("clusterName") private String clusterName; - public static final String SERIALIZED_NAME_NB_RECORDS = "nbRecords"; - - @SerializedName(SERIALIZED_NAME_NB_RECORDS) + @SerializedName("nbRecords") private Integer nbRecords; - public static final String SERIALIZED_NAME_DATA_SIZE = "dataSize"; - - @SerializedName(SERIALIZED_NAME_DATA_SIZE) + @SerializedName("dataSize") private Integer dataSize; - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; - public static final String SERIALIZED_NAME_HIGHLIGHT_RESULT = - "_highlightResult"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_RESULT) + @SerializedName("_highlightResult") private SearchUserIdsResponseHighlightResult highlightResult; public SearchUserIdsResponseHits userID(UserId userID) { @@ -49,7 +35,6 @@ public SearchUserIdsResponseHits userID(UserId userID) { * @return userID */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public UserId getUserID() { return userID; } @@ -69,11 +54,6 @@ public SearchUserIdsResponseHits clusterName(String clusterName) { * @return clusterName */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "c11-test", - required = true, - value = "Name of the cluster." - ) public String getClusterName() { return clusterName; } @@ -93,11 +73,6 @@ public SearchUserIdsResponseHits nbRecords(Integer nbRecords) { * @return nbRecords */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "3", - required = true, - value = "Number of records in the cluster." - ) public Integer getNbRecords() { return nbRecords; } @@ -117,11 +92,6 @@ public SearchUserIdsResponseHits dataSize(Integer dataSize) { * @return dataSize */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "481", - required = true, - value = "Data size taken by all the users assigned to the cluster." - ) public Integer getDataSize() { return dataSize; } @@ -141,10 +111,6 @@ public SearchUserIdsResponseHits objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "userID of the requested user. Same as userID." - ) public String getObjectID() { return objectID; } @@ -166,7 +132,6 @@ public SearchUserIdsResponseHits highlightResult( * @return highlightResult */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") public SearchUserIdsResponseHighlightResult getHighlightResult() { return highlightResult; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SnippetResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SnippetResult.java index e74c37c60c0..25386fac2d3 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SnippetResult.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SnippetResult.java @@ -5,16 +5,13 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.Objects; /** SnippetResult */ public class SnippetResult { - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) + @SerializedName("value") private String value; /** Indicates how well the attribute matched the search query. */ @@ -69,9 +66,7 @@ public MatchLevelEnum read(final JsonReader jsonReader) } } - public static final String SERIALIZED_NAME_MATCH_LEVEL = "matchLevel"; - - @SerializedName(SERIALIZED_NAME_MATCH_LEVEL) + @SerializedName("matchLevel") private MatchLevelEnum matchLevel; public SnippetResult value(String value) { @@ -85,10 +80,6 @@ public SnippetResult value(String value) { * @return value */ @javax.annotation.Nullable - @ApiModelProperty( - example = "George Clooney", - value = "Markup text with occurrences highlighted." - ) public String getValue() { return value; } @@ -108,9 +99,6 @@ public SnippetResult matchLevel(MatchLevelEnum matchLevel) { * @return matchLevel */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Indicates how well the attribute matched the search query." - ) public MatchLevelEnum getMatchLevel() { return matchLevel; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Source.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Source.java index b1eb087440e..3640457e8b5 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Source.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Source.java @@ -1,22 +1,15 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** The source. */ -@ApiModel(description = "The source.") public class Source { - public static final String SERIALIZED_NAME_SOURCE = "source"; - - @SerializedName(SERIALIZED_NAME_SOURCE) + @SerializedName("source") private String source; - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @SerializedName("description") private String description; public Source source(String source) { @@ -30,11 +23,6 @@ public Source source(String source) { * @return source */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "10.0.0.1/32", - required = true, - value = "The IP range of the source." - ) public String getSource() { return source; } @@ -54,7 +42,6 @@ public Source description(String description) { * @return description */ @javax.annotation.Nullable - @ApiModelProperty(value = "The description of the source.") public String getDescription() { return description; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java index 7c1c8fbd616..2afc0fb4f85 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java @@ -1,8 +1,6 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -13,25 +11,15 @@ * Map of language ISO code supported by the dictionary (e.g., \"en\" for English) to a boolean * value. */ -@ApiModel( - description = "Map of language ISO code supported by the dictionary (e.g., \"en\" for English) to a" + - " boolean value." -) public class StandardEntries { - public static final String SERIALIZED_NAME_PLURALS = "plurals"; - - @SerializedName(SERIALIZED_NAME_PLURALS) + @SerializedName("plurals") private Map plurals = null; - public static final String SERIALIZED_NAME_STOPWORDS = "stopwords"; - - @SerializedName(SERIALIZED_NAME_STOPWORDS) + @SerializedName("stopwords") private Map stopwords = null; - public static final String SERIALIZED_NAME_COMPOUNDS = "compounds"; - - @SerializedName(SERIALIZED_NAME_COMPOUNDS) + @SerializedName("compounds") private Map compounds = null; public StandardEntries plurals(Map plurals) { @@ -53,7 +41,6 @@ public StandardEntries putPluralsItem(String key, Boolean pluralsItem) { * @return plurals */ @javax.annotation.Nullable - @ApiModelProperty(value = "Language ISO code.") public Map getPlurals() { return plurals; } @@ -81,7 +68,6 @@ public StandardEntries putStopwordsItem(String key, Boolean stopwordsItem) { * @return stopwords */ @javax.annotation.Nullable - @ApiModelProperty(value = "Language ISO code.") public Map getStopwords() { return stopwords; } @@ -109,7 +95,6 @@ public StandardEntries putCompoundsItem(String key, Boolean compoundsItem) { * @return compounds */ @javax.annotation.Nullable - @ApiModelProperty(value = "Language ISO code.") public Map getCompounds() { return compounds; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHit.java index 514cc6431b2..cde0e827742 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHit.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHit.java @@ -5,20 +5,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Synonym object. */ -@ApiModel(description = "Synonym object.") public class SynonymHit { - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; /** Type of the synonym object. */ @@ -76,45 +71,28 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { } } - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) + @SerializedName("type") private TypeEnum type; - public static final String SERIALIZED_NAME_SYNONYMS = "synonyms"; - - @SerializedName(SERIALIZED_NAME_SYNONYMS) + @SerializedName("synonyms") private List synonyms = null; - public static final String SERIALIZED_NAME_INPUT = "input"; - - @SerializedName(SERIALIZED_NAME_INPUT) + @SerializedName("input") private String input; - public static final String SERIALIZED_NAME_WORD = "word"; - - @SerializedName(SERIALIZED_NAME_WORD) + @SerializedName("word") private String word; - public static final String SERIALIZED_NAME_CORRECTIONS = "corrections"; - - @SerializedName(SERIALIZED_NAME_CORRECTIONS) + @SerializedName("corrections") private List corrections = null; - public static final String SERIALIZED_NAME_PLACEHOLDER = "placeholder"; - - @SerializedName(SERIALIZED_NAME_PLACEHOLDER) + @SerializedName("placeholder") private String placeholder; - public static final String SERIALIZED_NAME_REPLACEMENTS = "replacements"; - - @SerializedName(SERIALIZED_NAME_REPLACEMENTS) + @SerializedName("replacements") private List replacements = null; - public static final String SERIALIZED_NAME_HIGHLIGHT_RESULT = - "_highlightResult"; - - @SerializedName(SERIALIZED_NAME_HIGHLIGHT_RESULT) + @SerializedName("_highlightResult") private SynonymHitHighlightResult highlightResult; public SynonymHit objectID(String objectID) { @@ -128,10 +106,6 @@ public SynonymHit objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Unique identifier of the synonym object to be created or updated." - ) public String getObjectID() { return objectID; } @@ -151,7 +125,6 @@ public SynonymHit type(TypeEnum type) { * @return type */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Type of the synonym object.") public TypeEnum getType() { return type; } @@ -179,7 +152,6 @@ public SynonymHit addSynonymsItem(String synonymsItem) { * @return synonyms */ @javax.annotation.Nullable - @ApiModelProperty(value = "Words or phrases to be considered equivalent.") public List getSynonyms() { return synonyms; } @@ -199,9 +171,6 @@ public SynonymHit input(String input) { * @return input */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Word or phrase to appear in query strings (for onewaysynonym)." - ) public String getInput() { return input; } @@ -221,9 +190,6 @@ public SynonymHit word(String word) { * @return word */ @javax.annotation.Nullable - @ApiModelProperty( - value = "Word or phrase to appear in query strings (for altcorrection1 and altcorrection2)." - ) public String getWord() { return word; } @@ -251,7 +217,6 @@ public SynonymHit addCorrectionsItem(String correctionsItem) { * @return corrections */ @javax.annotation.Nullable - @ApiModelProperty(value = "Words to be matched in records.") public List getCorrections() { return corrections; } @@ -271,7 +236,6 @@ public SynonymHit placeholder(String placeholder) { * @return placeholder */ @javax.annotation.Nullable - @ApiModelProperty(value = "Token to be put inside records.") public String getPlaceholder() { return placeholder; } @@ -299,7 +263,6 @@ public SynonymHit addReplacementsItem(String replacementsItem) { * @return replacements */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of query words that will match the token.") public List getReplacements() { return replacements; } @@ -319,7 +282,6 @@ public SynonymHit highlightResult(SynonymHitHighlightResult highlightResult) { * @return highlightResult */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public SynonymHitHighlightResult getHighlightResult() { return highlightResult; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHitHighlightResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHitHighlightResult.java index ccc0e886e3f..83b1986a877 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHitHighlightResult.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SynonymHitHighlightResult.java @@ -1,24 +1,17 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** Highlighted results */ -@ApiModel(description = "Highlighted results") public class SynonymHitHighlightResult { - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) + @SerializedName("type") private HighlightResult type; - public static final String SERIALIZED_NAME_SYNONYMS = "synonyms"; - - @SerializedName(SERIALIZED_NAME_SYNONYMS) + @SerializedName("synonyms") private List synonyms = null; public SynonymHitHighlightResult type(HighlightResult type) { @@ -32,7 +25,6 @@ public SynonymHitHighlightResult type(HighlightResult type) { * @return type */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public HighlightResult getType() { return type; } @@ -62,7 +54,6 @@ public SynonymHitHighlightResult addSynonymsItem( * @return synonyms */ @javax.annotation.Nullable - @ApiModelProperty(value = "") public List getSynonyms() { return synonyms; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/TimeRange.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/TimeRange.java index 59bdab558eb..446c5f6c7dc 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/TimeRange.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/TimeRange.java @@ -1,20 +1,15 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** TimeRange */ public class TimeRange { - public static final String SERIALIZED_NAME_FROM = "from"; - - @SerializedName(SERIALIZED_NAME_FROM) + @SerializedName("from") private Integer from; - public static final String SERIALIZED_NAME_UNTIL = "until"; - - @SerializedName(SERIALIZED_NAME_UNTIL) + @SerializedName("until") private Integer until; public TimeRange from(Integer from) { @@ -28,10 +23,6 @@ public TimeRange from(Integer from) { * @return from */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Lower bound of the time range (Unix timestamp)." - ) public Integer getFrom() { return from; } @@ -51,10 +42,6 @@ public TimeRange until(Integer until) { * @return until */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Upper bound of the time range (Unix timestamp)." - ) public Integer getUntil() { return until; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdateApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdateApiKeyResponse.java index 2328d98f9a9..434f5ac3401 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdateApiKeyResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdateApiKeyResponse.java @@ -1,21 +1,16 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** UpdateApiKeyResponse */ public class UpdateApiKeyResponse { - public static final String SERIALIZED_NAME_KEY = "key"; - - @SerializedName(SERIALIZED_NAME_KEY) + @SerializedName("key") private String key; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; public UpdateApiKeyResponse key(String key) { @@ -29,7 +24,6 @@ public UpdateApiKeyResponse key(String key) { * @return key */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Key string.") public String getKey() { return key; } @@ -49,10 +43,6 @@ public UpdateApiKeyResponse updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of last update (ISO-8601 format)." - ) public OffsetDateTime getUpdatedAt() { return updatedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtResponse.java index fe0fb18ec7a..b9ba635edbc 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtResponse.java @@ -1,25 +1,16 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** The response with a taskID and an updatedAt timestamp. */ -@ApiModel( - description = "The response with a taskID and an updatedAt timestamp." -) public class UpdatedAtResponse { - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Integer taskID; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; public UpdatedAtResponse taskID(Integer taskID) { @@ -33,10 +24,6 @@ public UpdatedAtResponse taskID(Integer taskID) { * @return taskID */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "taskID of the indexing task to wait for." - ) public Integer getTaskID() { return taskID; } @@ -56,10 +43,6 @@ public UpdatedAtResponse updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of last update (ISO-8601 format)." - ) public OffsetDateTime getUpdatedAt() { return updatedAt; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtWithObjectIdResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtWithObjectIdResponse.java index acd29d0b8c8..cbaeb72ad6a 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtWithObjectIdResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedAtWithObjectIdResponse.java @@ -1,30 +1,19 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** The response with a taskID, an objectID and an updatedAt timestamp. */ -@ApiModel( - description = "The response with a taskID, an objectID and an updatedAt timestamp." -) public class UpdatedAtWithObjectIdResponse { - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Integer taskID; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; public UpdatedAtWithObjectIdResponse taskID(Integer taskID) { @@ -38,7 +27,6 @@ public UpdatedAtWithObjectIdResponse taskID(Integer taskID) { * @return taskID */ @javax.annotation.Nullable - @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { return taskID; } @@ -58,7 +46,6 @@ public UpdatedAtWithObjectIdResponse updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nullable - @ApiModelProperty(value = "Date of last update (ISO-8601 format).") public OffsetDateTime getUpdatedAt() { return updatedAt; } @@ -78,7 +65,6 @@ public UpdatedAtWithObjectIdResponse objectID(String objectID) { * @return objectID */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unique identifier of the object.") public String getObjectID() { return objectID; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedRuleResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedRuleResponse.java index 853b43f42d3..2e6e2c706e8 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedRuleResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UpdatedRuleResponse.java @@ -1,26 +1,19 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.Objects; /** UpdatedRuleResponse */ public class UpdatedRuleResponse { - public static final String SERIALIZED_NAME_OBJECT_I_D = "objectID"; - - @SerializedName(SERIALIZED_NAME_OBJECT_I_D) + @SerializedName("objectID") private String objectID; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - - @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @SerializedName("updatedAt") private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; - - @SerializedName(SERIALIZED_NAME_TASK_I_D) + @SerializedName("taskID") private Integer taskID; public UpdatedRuleResponse objectID(String objectID) { @@ -34,7 +27,6 @@ public UpdatedRuleResponse objectID(String objectID) { * @return objectID */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unique identifier of the object.") public String getObjectID() { return objectID; } @@ -54,10 +46,6 @@ public UpdatedRuleResponse updatedAt(OffsetDateTime updatedAt) { * @return updatedAt */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "Date of last update (ISO-8601 format)." - ) public OffsetDateTime getUpdatedAt() { return updatedAt; } @@ -77,10 +65,6 @@ public UpdatedRuleResponse taskID(Integer taskID) { * @return taskID */ @javax.annotation.Nonnull - @ApiModelProperty( - required = true, - value = "taskID of the indexing task to wait for." - ) public Integer getTaskID() { return taskID; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UserId.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UserId.java index 03a68bf6c30..d5a9994b9e4 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UserId.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/UserId.java @@ -1,32 +1,21 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** A userID. */ -@ApiModel(description = "A userID.") public class UserId { - public static final String SERIALIZED_NAME_USER_I_D = "userID"; - - @SerializedName(SERIALIZED_NAME_USER_I_D) + @SerializedName("userID") private String userID; - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) + @SerializedName("clusterName") private String clusterName; - public static final String SERIALIZED_NAME_NB_RECORDS = "nbRecords"; - - @SerializedName(SERIALIZED_NAME_NB_RECORDS) + @SerializedName("nbRecords") private Integer nbRecords; - public static final String SERIALIZED_NAME_DATA_SIZE = "dataSize"; - - @SerializedName(SERIALIZED_NAME_DATA_SIZE) + @SerializedName("dataSize") private Integer dataSize; public UserId userID(String userID) { @@ -40,11 +29,6 @@ public UserId userID(String userID) { * @return userID */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "user1", - required = true, - value = "userID of the user." - ) public String getUserID() { return userID; } @@ -64,11 +48,6 @@ public UserId clusterName(String clusterName) { * @return clusterName */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "c1-test", - required = true, - value = "Cluster on which the user is assigned." - ) public String getClusterName() { return clusterName; } @@ -88,11 +67,6 @@ public UserId nbRecords(Integer nbRecords) { * @return nbRecords */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "42", - required = true, - value = "Number of records belonging to the user." - ) public Integer getNbRecords() { return nbRecords; } @@ -112,11 +86,6 @@ public UserId dataSize(Integer dataSize) { * @return dataSize */ @javax.annotation.Nonnull - @ApiModelProperty( - example = "0", - required = true, - value = "Data size used by the user." - ) public Integer getDataSize() { return dataSize; } diff --git a/clients/algoliasearch-client-java-2/pom.xml b/clients/algoliasearch-client-java-2/pom.xml index e905021f318..0c8cdd639e3 100644 --- a/clients/algoliasearch-client-java-2/pom.xml +++ b/clients/algoliasearch-client-java-2/pom.xml @@ -160,11 +160,6 @@ - - io.swagger - swagger-annotations - ${swagger-core-version} - com.google.code.findbugs @@ -191,11 +186,6 @@ gson-fire ${gson-fire-version} - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - jakarta.annotation jakarta.annotation-api @@ -213,10 +203,8 @@ ${java.version} ${java.version} 1.8.5 - 1.6.2 4.9.1 2.8.6 - 3.11 0.2.1 1.3.5 UTF-8 diff --git a/templates/java/libraries/okhttp-gson/pom.mustache b/templates/java/libraries/okhttp-gson/pom.mustache index 8482f4e4156..dc9a8bae0db 100644 --- a/templates/java/libraries/okhttp-gson/pom.mustache +++ b/templates/java/libraries/okhttp-gson/pom.mustache @@ -167,11 +167,6 @@ - - io.swagger - swagger-annotations - ${swagger-core-version} - com.google.code.findbugs @@ -198,11 +193,6 @@ gson-fire ${gson-fire-version} - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - jakarta.annotation jakarta.annotation-api @@ -222,10 +212,8 @@ ${java.version} ${java.version} 1.8.5 - 1.6.2 4.9.1 2.8.6 - 3.11 {{#openApiNullable}} 0.2.1 {{/openApiNullable}} diff --git a/templates/java/model.mustache b/templates/java/model.mustache index bb0704faa1f..4bdf98a6b7b 100644 --- a/templates/java/model.mustache +++ b/templates/java/model.mustache @@ -1,9 +1,5 @@ package {{package}}; -{{#useReflectionEqualsHashCode}} -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -{{/useReflectionEqualsHashCode}} import java.util.Objects; import java.util.Arrays; {{#imports}} @@ -12,16 +8,6 @@ import {{import}}; {{#serializableModel}} import java.io.Serializable; {{/serializableModel}} -{{#jackson}} -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -{{#withXml}} -import com.fasterxml.jackson.dataformat.xml.annotation.*; -{{/withXml}} -{{/jackson}} -{{#withXml}} -import javax.xml.bind.annotation.*; -{{/withXml}} {{#jsonb}} import java.lang.reflect.Type; import javax.json.bind.annotation.JsonbTypeDeserializer; diff --git a/templates/java/modelEnum.mustache b/templates/java/modelEnum.mustache index 3dad6f9fbbb..dd66facde7e 100644 --- a/templates/java/modelEnum.mustache +++ b/templates/java/modelEnum.mustache @@ -22,16 +22,10 @@ import com.google.gson.stream.JsonWriter; {{/jsonb}} {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} - {{#enumDescription}} - /** + {{#enumDescription}}/** * {{{.}}} - */ - {{/enumDescription}} - {{#withXml}} - @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) - {{/withXml}} - {{{name}}}({{{value}}}){{^-last}}, - {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + */{{/enumDescription}} + {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} private {{{dataType}}} value; diff --git a/templates/java/pojo.mustache b/templates/java/pojo.mustache index a0b6bf47e70..98c3840e214 100644 --- a/templates/java/pojo.mustache +++ b/templates/java/pojo.mustache @@ -2,16 +2,7 @@ * {{&description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} * @deprecated{{/isDeprecated}} */{{#isDeprecated}} -@Deprecated{{/isDeprecated}}{{#description}} -@ApiModel(description = "{{{.}}}"){{/description}} -{{#jackson}} -@JsonPropertyOrder({ -{{#vars}} - {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} -{{/vars}} -}) -@JsonTypeName("{{name}}") -{{/jackson}} +@Deprecated{{/isDeprecated}} {{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} @@ -30,34 +21,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/isEnum}} {{#gson}} - public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; - {{/gson}} - {{#jackson}} - public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; - {{/jackson}} - {{#withXml}} - {{#isXmlAttribute}} - @XmlAttribute(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isXmlAttribute}} - {{^isXmlAttribute}} - {{^isContainer}} - @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isContainer}} - {{#isContainer}} - // Is a container wrapped={{isXmlWrapped}} - {{#items}} - // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} - // items.example={{example}} items.type={{dataType}} - @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/items}} - {{#isXmlWrapped}} - @XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isXmlWrapped}} - {{/isContainer}} - {{/isXmlAttribute}} - {{/withXml}} - {{#gson}} - @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + @SerializedName("{{baseName}}") {{/gson}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} @@ -193,10 +157,6 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} -@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{&description}}") -{{#vendorExtensions.x-extra-annotation}} - {{{vendorExtensions.x-extra-annotation}}} -{{/vendorExtensions.x-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} @JsonIgnore From 30d461ccee89d833a38d2a0fec027dc0a4c8b89c Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Tue, 4 Jan 2022 15:42:17 +0100 Subject: [PATCH 4/4] remove jackson --- .../com/algolia/model/BaseSearchParams.java | 25 ----- .../com/algolia/model/SearchParams.java | 25 ----- .../com/algolia/model/SearchParamsObject.java | 25 ----- .../com/algolia/model/StandardEntries.java | 25 ----- clients/algoliasearch-client-java-2/pom.xml | 6 -- templates/java/jackson_annotations.mustache | 19 ---- .../java/libraries/okhttp-gson/pom.mustache | 10 -- templates/java/model.mustache | 1 - templates/java/modelEnum.mustache | 10 -- templates/java/modelInnerEnum.mustache | 6 -- templates/java/oneof_interface.mustache | 2 +- templates/java/pojo.mustache | 95 ++----------------- templates/java/typeInfoAnnotation.mustache | 16 ---- templates/java/xmlAnnotation.mustache | 6 -- 14 files changed, 8 insertions(+), 263 deletions(-) delete mode 100644 templates/java/jackson_annotations.mustache delete mode 100644 templates/java/typeInfoAnnotation.mustache delete mode 100644 templates/java/xmlAnnotation.mustache diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java index 10ef20e16f9..7c8ed535cc7 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseSearchParams.java @@ -3,10 +3,8 @@ import com.google.gson.annotations.SerializedName; import java.math.BigDecimal; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; -import org.openapitools.jackson.nullable.JsonNullable; /** BaseSearchParams */ public class BaseSearchParams { @@ -904,22 +902,6 @@ public boolean equals(Object o) { ); } - private static boolean equalsNullable( - JsonNullable a, - JsonNullable b - ) { - return ( - a == b || - ( - a != null && - b != null && - a.isPresent() && - b.isPresent() && - Objects.deepEquals(a.get(), b.get()) - ) - ); - } - @Override public int hashCode() { return Objects.hash( @@ -959,13 +941,6 @@ public int hashCode() { ); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] { a.get() }) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java index c9fdce5d1bf..6f1ddeed996 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParams.java @@ -8,10 +8,8 @@ import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; -import org.openapitools.jackson.nullable.JsonNullable; /** SearchParams */ public class SearchParams { @@ -2529,22 +2527,6 @@ public boolean equals(Object o) { ); } - private static boolean equalsNullable( - JsonNullable a, - JsonNullable b - ) { - return ( - a == b || - ( - a != null && - b != null && - a.isPresent() && - b.isPresent() && - Objects.deepEquals(a.get(), b.get()) - ) - ); - } - @Override public int hashCode() { return Objects.hash( @@ -2629,13 +2611,6 @@ public int hashCode() { ); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] { a.get() }) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java index 809d052c96c..37138d4502b 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchParamsObject.java @@ -8,10 +8,8 @@ import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; -import org.openapitools.jackson.nullable.JsonNullable; /** SearchParamsObject */ public class SearchParamsObject { @@ -2563,22 +2561,6 @@ public boolean equals(Object o) { ); } - private static boolean equalsNullable( - JsonNullable a, - JsonNullable b - ) { - return ( - a == b || - ( - a != null && - b != null && - a.isPresent() && - b.isPresent() && - Objects.deepEquals(a.get(), b.get()) - ) - ); - } - @Override public int hashCode() { return Objects.hash( @@ -2662,13 +2644,6 @@ public int hashCode() { ); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] { a.get() }) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java index 2afc0fb4f85..40de457f3de 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/StandardEntries.java @@ -1,11 +1,9 @@ package com.algolia.model; import com.google.gson.annotations.SerializedName; -import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.openapitools.jackson.nullable.JsonNullable; /** * Map of language ISO code supported by the dictionary (e.g., \"en\" for English) to a boolean @@ -119,34 +117,11 @@ public boolean equals(Object o) { ); } - private static boolean equalsNullable( - JsonNullable a, - JsonNullable b - ) { - return ( - a == b || - ( - a != null && - b != null && - a.isPresent() && - b.isPresent() && - Objects.deepEquals(a.get(), b.get()) - ) - ); - } - @Override public int hashCode() { return Objects.hash(plurals, stopwords, compounds); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] { a.get() }) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/clients/algoliasearch-client-java-2/pom.xml b/clients/algoliasearch-client-java-2/pom.xml index 0c8cdd639e3..86b619a5bda 100644 --- a/clients/algoliasearch-client-java-2/pom.xml +++ b/clients/algoliasearch-client-java-2/pom.xml @@ -192,11 +192,6 @@ ${jakarta-annotation-version} provided - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - 1.8 @@ -205,7 +200,6 @@ 1.8.5 4.9.1 2.8.6 - 0.2.1 1.3.5 UTF-8 diff --git a/templates/java/jackson_annotations.mustache b/templates/java/jackson_annotations.mustache deleted file mode 100644 index d7a36b1b94d..00000000000 --- a/templates/java/jackson_annotations.mustache +++ /dev/null @@ -1,19 +0,0 @@ -{{! - If this is map and items are nullable, make sure that nulls are included. - To determine what JsonInclude.Include method to use, consider the following: - * If the field is required, always include it, even if it is null. - * Else use custom behaviour, IOW use whatever is defined on the object mapper - }} - @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) - @JsonInclude({{#isMap}}{{#items.isNullable}}content = JsonInclude.Include.ALWAYS, {{/items.isNullable}}{{/isMap}}value = JsonInclude.Include.{{#required}}ALWAYS{{/required}}{{^required}}USE_DEFAULTS{{/required}}) - {{#withXml}} - {{^isContainer}} - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isContainer}} - {{#isContainer}} - {{#isXmlWrapped}} - // items.xmlName={{items.xmlName}} - @JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{items.baseName}}{{/items.xmlName}}") - {{/isXmlWrapped}} - {{/isContainer}} - {{/withXml}} diff --git a/templates/java/libraries/okhttp-gson/pom.mustache b/templates/java/libraries/okhttp-gson/pom.mustache index dc9a8bae0db..c366b275451 100644 --- a/templates/java/libraries/okhttp-gson/pom.mustache +++ b/templates/java/libraries/okhttp-gson/pom.mustache @@ -199,13 +199,6 @@ ${jakarta-annotation-version} provided - {{#openApiNullable}} - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - {{/openApiNullable}} {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} @@ -214,9 +207,6 @@ 1.8.5 4.9.1 2.8.6 - {{#openApiNullable}} - 0.2.1 - {{/openApiNullable}} 1.3.5 UTF-8 diff --git a/templates/java/model.mustache b/templates/java/model.mustache index 4bdf98a6b7b..bd1dc88ba76 100644 --- a/templates/java/model.mustache +++ b/templates/java/model.mustache @@ -1,7 +1,6 @@ package {{package}}; import java.util.Objects; -import java.util.Arrays; {{#imports}} import {{import}}; {{/imports}} diff --git a/templates/java/modelEnum.mustache b/templates/java/modelEnum.mustache index dd66facde7e..7ba22c479f3 100644 --- a/templates/java/modelEnum.mustache +++ b/templates/java/modelEnum.mustache @@ -1,7 +1,3 @@ -{{#jackson}} -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -{{/jackson}} {{#gson}} import java.io.IOException; import com.google.gson.TypeAdapter; @@ -33,9 +29,6 @@ import com.google.gson.stream.JsonWriter; this.value = value; } -{{#jackson}} - @JsonValue -{{/jackson}} public {{{dataType}}} getValue() { return value; } @@ -45,9 +38,6 @@ import com.google.gson.stream.JsonWriter; return String.valueOf(value); } -{{#jackson}} - @JsonCreator -{{/jackson}} public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { diff --git a/templates/java/modelInnerEnum.mustache b/templates/java/modelInnerEnum.mustache index 7bd66e2bea9..4334654dc3f 100644 --- a/templates/java/modelInnerEnum.mustache +++ b/templates/java/modelInnerEnum.mustache @@ -34,9 +34,6 @@ this.value = value; } -{{#jackson}} - @JsonValue -{{/jackson}} public {{{dataType}}} getValue() { return value; } @@ -46,9 +43,6 @@ return String.valueOf(value); } -{{#jackson}} - @JsonCreator -{{/jackson}} public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { diff --git a/templates/java/oneof_interface.mustache b/templates/java/oneof_interface.mustache index 458dd3a0a36..e2927410ffd 100644 --- a/templates/java/oneof_interface.mustache +++ b/templates/java/oneof_interface.mustache @@ -1,4 +1,4 @@ -{{>additionalModelTypeAnnotations}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} +{{>additionalModelTypeAnnotations}} public interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#discriminator}} public {{propertyType}} {{propertyGetter}}(); diff --git a/templates/java/pojo.mustache b/templates/java/pojo.mustache index 98c3840e214..bf46406f4ad 100644 --- a/templates/java/pojo.mustache +++ b/templates/java/pojo.mustache @@ -3,7 +3,7 @@ * @deprecated{{/isDeprecated}} */{{#isDeprecated}} @Deprecated{{/isDeprecated}} -{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{>additionalModelTypeAnnotations}} public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -23,22 +23,12 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName("{{baseName}}") {{/gson}} - {{#vendorExtensions.x-is-jackson-optional-nullable}} - {{#isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); - {{/isContainer}} - {{^isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; - {{/isContainer}} - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}} = null{{/required}}; {{/isContainer}} {{^isContainer}} {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} - {{/vendorExtensions.x-is-jackson-optional-nullable}} {{/vars}} {{#parcelableModel}} @@ -66,25 +56,12 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { - {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; return this; } {{#isArray}} public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - if (this.{{name}} == null || !this.{{name}}.isPresent()) { - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); - } - try { - this.{{name}}.get().add({{name}}Item); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} {{^required}} if (this.{{name}} == null) { this.{{name}} = {{{defaultValue}}}; @@ -92,24 +69,11 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/required}} this.{{name}}.add({{name}}Item); return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} } {{/isArray}} {{#isMap}} public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - if (this.{{name}} == null || !this.{{name}}.isPresent()) { - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); - } - try { - this.{{name}}.get().put(key, {{name}}Item); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} {{^required}} if (this.{{name}} == null) { this.{{name}} = {{{defaultValue}}}; @@ -117,7 +81,6 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/required}} this.{{name}}.put(key, {{name}}Item); return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} } {{/isMap}} @@ -157,46 +120,13 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} -{{#vendorExtensions.x-is-jackson-optional-nullable}} - {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} - @JsonIgnore -{{/vendorExtensions.x-is-jackson-optional-nullable}} -{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} public {{{datatypeWithEnum}}} {{getter}}() { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} - if ({{name}} == null) { - {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; - } - {{/isReadOnly}} - return {{name}}.orElse(null); - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - return {{name}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - } - - {{#vendorExtensions.x-is-jackson-optional-nullable}} -{{> jackson_annotations}} - public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { return {{name}}; } - {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} - @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) - {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { - {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} - this.{{name}} = {{name}}; - } - {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^isReadOnly}} -{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} + public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} } {{/isReadOnly}} @@ -215,16 +145,12 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return false; }{{#hasVars}} {{classname}} {{classVarName}} = ({{classname}}) o; - return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} && {{/-last}}{{/vars}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} {{/useReflectionEqualsHashCode}} - }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + } @Override public int hashCode() { @@ -232,16 +158,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return HashCodeBuilder.reflectionHashCode(this); {{/useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); {{/useReflectionEqualsHashCode}} - }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + } @Override public String toString() { diff --git a/templates/java/typeInfoAnnotation.mustache b/templates/java/typeInfoAnnotation.mustache deleted file mode 100644 index 63eb42ea500..00000000000 --- a/templates/java/typeInfoAnnotation.mustache +++ /dev/null @@ -1,16 +0,0 @@ -{{#jackson}} - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) -{{#discriminator.mappedModels}} -{{#-first}} -@JsonSubTypes({ -{{/-first}} - @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), -{{#-last}} -}) -{{/-last}} -{{/discriminator.mappedModels}} -{{#isClassnameSanitized}} -@JsonTypeName("{{name}}") -{{/isClassnameSanitized}} -{{/jackson}} diff --git a/templates/java/xmlAnnotation.mustache b/templates/java/xmlAnnotation.mustache deleted file mode 100644 index af6aaa50fbb..00000000000 --- a/templates/java/xmlAnnotation.mustache +++ /dev/null @@ -1,6 +0,0 @@ -{{#withXml}} - -@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") -@XmlAccessorType(XmlAccessType.FIELD) -{{#jackson}} -@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}"){{/jackson}}{{/withXml}}