From d2d77f93de28cf16159ba85dce3994eb32915a7d Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Fri, 10 Dec 2021 17:29:30 +0100 Subject: [PATCH 01/28] Added multiclusters endpoints for the search client --- .../model/deleteUserProfileResponse.ts | 22 ++- .../client-personalization/model/errorBase.ts | 12 +- .../model/eventScoring.ts | 30 ++-- .../model/facetScoring.ts | 22 ++- .../model/getUserTokenResponse.ts | 30 ++-- .../client-personalization/model/models.ts | 51 +++--- .../model/personalizationStrategyObject.ts | 33 ++-- .../setPersonalizationStrategyResponse.ts | 14 +- .../client-personalization/src/apis.ts | 3 +- .../src/personalizationApi.ts | 161 ++++++++---------- specs/common/parameters.yml | 5 + specs/search/common/parameters.yml | 35 ++++ specs/search/common/schemas/Cluster.yml | 16 ++ specs/search/common/schemas/UserId.yml | 12 ++ .../multiclusters/batchAssignUserIds.yml | 33 ++++ .../paths/multiclusters/getTopUserIds.yml | 19 +++ .../multiclusters/hasPendingMappings.yml | 28 +++ .../paths/multiclusters/listClusters.yml | 19 +++ specs/search/paths/multiclusters/schemas.yml | 145 ++++++++++++++++ .../paths/multiclusters/searchUserIds.yml | 30 ++++ specs/search/paths/multiclusters/userId.yml | 46 +++++ specs/search/paths/multiclusters/userIds.yml | 56 ++++++ specs/search/spec.yml | 32 ++-- 23 files changed, 651 insertions(+), 203 deletions(-) create mode 100644 specs/search/common/parameters.yml create mode 100644 specs/search/common/schemas/Cluster.yml create mode 100644 specs/search/common/schemas/UserId.yml create mode 100644 specs/search/paths/multiclusters/schemas.yml diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts b/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts index 45abf172e54..64d960a89e3 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts @@ -1,10 +1,14 @@ + + + export type DeleteUserProfileResponse = { - /** - * UserToken representing the user for which to fetch the Personalization profile. - */ - userToken: string; - /** - * A date until which the data can safely be considered as deleted for the given user. Any data received after the deletedUntil date will start building a new user profile. - */ - deletedUntil: Date; -}; + /** + * userToken representing the user for which to fetch the Personalization profile. + */ + userToken: string; + /** + * A date until which the data can safely be considered as deleted for the given user. Any data received after the deletedUntil date will start building a new user profile. + */ + deletedUntil: Date; +} + diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts b/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts index a533aa7a151..95cfaefec34 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts @@ -1,6 +1,10 @@ + + + /** - * Error. - */ +* Error. +*/ export type ErrorBase = { - message?: string; -}; + message?: string; +} + diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts b/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts index 277ce92eb90..abf71f5e59b 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts @@ -1,14 +1,18 @@ + + + export type EventScoring = { - /** - * The score for the event. - */ - score: number; - /** - * The name of the event. - */ - eventName: string; - /** - * The type of the event. - */ - eventType: string; -}; + /** + * The score for the event. + */ + score: number; + /** + * The name of the event. + */ + eventName: string; + /** + * The type of the event. + */ + eventType: string; +} + diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts b/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts index ae2c9d1b5e0..9d38f026ff5 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts @@ -1,10 +1,14 @@ + + + export type FacetScoring = { - /** - * The score for the event. - */ - score: number; - /** - * The name of the facet. - */ - facetName: string; -}; + /** + * The score for the event. + */ + score: number; + /** + * The name of the facet. + */ + facetName: string; +} + diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts b/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts index 6da93391d46..6b9ff1c3029 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts @@ -1,14 +1,18 @@ + + + export type GetUserTokenResponse = { - /** - * UserToken representing the user for which to fetch the Personalization profile. - */ - userToken: string; - /** - * Date of last event update. (ISO-8601 format). - */ - lastEventAt: Date; - /** - * The userToken scores. - */ - scores: { [key: string]: Record }; -}; + /** + * userToken representing the user for which to fetch the Personalization profile. + */ + userToken: string; + /** + * Date of last event update. (ISO-8601 format) + */ + lastEventAt: Date; + /** + * The userToken scores. + */ + scores: { [key: string]: object; }; +} + diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/models.ts b/clients/algoliasearch-client-javascript/client-personalization/model/models.ts index 3260c5c0fb7..981743246fb 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/models.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/models.ts @@ -9,41 +9,32 @@ export * from './getUserTokenResponse'; export * from './personalizationStrategyObject'; export * from './setPersonalizationStrategyResponse'; + export interface Authentication { - /** - * Apply authentication settings to header and query params. - */ - applyToRequest: (requestOptions: RequestOptions) => Promise | void; + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: RequestOptions): Promise | void; } export class ApiKeyAuth implements Authentication { - apiKey: string = ''; + public apiKey: string = ''; - constructor(private location: string, private paramName: string) {} + constructor(private location: string, private paramName: string) { + } - applyToRequest(requestOptions: RequestOptions): void { - if (this.location === 'query') { - requestOptions.queryParameters[this.paramName] = this.apiKey; - } else if ( - this.location === 'header' && - requestOptions && - requestOptions.headers - ) { - requestOptions.headers[this.paramName] = this.apiKey; - } else if ( - this.location === 'cookie' && - requestOptions && - requestOptions.headers - ) { - if (requestOptions.headers.Cookie) { - requestOptions.headers.Cookie += `; ${ - this.paramName - }=${encodeURIComponent(this.apiKey)}`; - } else { - requestOptions.headers.Cookie = `${this.paramName}=${encodeURIComponent( - this.apiKey - )}`; - } + applyToRequest(requestOptions: RequestOptions): void { + if (this.location === "query") { + requestOptions.queryParameters[this.paramName] = this.apiKey; + } else if (this.location === "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location === 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } } - } } diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts b/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts index db6606a01d1..d458f1f342a 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts @@ -1,17 +1,20 @@ -import type { EventScoring } from './eventScoring'; -import type { FacetScoring } from './facetScoring'; +import { EventScoring } from './eventScoring'; +import { FacetScoring } from './facetScoring'; + + export type PersonalizationStrategyObject = { - /** - * Scores associated with the events. - */ - eventScoring: EventScoring[]; - /** - * Scores associated with the facets. - */ - facetScoring: FacetScoring[]; - /** - * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled). - */ - personalizationImpact: number; -}; + /** + * Scores associated with the events. + */ + eventScoring: Array; + /** + * Scores associated with the facets. + */ + facetScoring: Array; + /** + * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled). + */ + personalizationImpact: number; +} + diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts b/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts index 4eaa97be655..fb22c7974a1 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts @@ -1,6 +1,10 @@ + + + export type SetPersonalizationStrategyResponse = { - /** - * A message confirming the strategy update. - */ - message: string; -}; + /** + * A message confirming the strategy update. + */ + message: string; +} + diff --git a/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts b/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts index 7fba93227be..3189fb214e3 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts @@ -1,6 +1,5 @@ -import { PersonalizationApi } from './personalizationApi'; - export * from './personalizationApi'; +import { PersonalizationApi } from './personalizationApi'; export * from '../utils/errors'; export { EchoRequester } from '../utils/requester/EchoRequester'; diff --git a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts index 8ecc4c7a9f5..dc610e08b6f 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts @@ -1,11 +1,14 @@ -import type { DeleteUserProfileResponse } from '../model/deleteUserProfileResponse'; -import type { GetUserTokenResponse } from '../model/getUserTokenResponse'; +import { shuffle } from '../utils/helpers'; +import { Transporter } from '../utils/Transporter'; +import { Headers, Host, Request, RequestOptions } from '../utils/types'; +import { Requester } from '../utils/requester/Requester'; + +import { DeleteUserProfileResponse } from '../model/deleteUserProfileResponse'; +import { ErrorBase } from '../model/errorBase'; +import { GetUserTokenResponse } from '../model/getUserTokenResponse'; +import { PersonalizationStrategyObject } from '../model/personalizationStrategyObject'; +import { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse'; import { ApiKeyAuth } from '../model/models'; -import type { PersonalizationStrategyObject } from '../model/personalizationStrategyObject'; -import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse'; -import { Transporter } from '../utils/Transporter'; -import type { Requester } from '../utils/requester/Requester'; -import type { Headers, Host, Request, RequestOptions } from '../utils/types'; export enum PersonalizationApiKeys { apiKey, @@ -14,40 +17,40 @@ export enum PersonalizationApiKeys { export class PersonalizationApi { protected authentications = { - apiKey: new ApiKeyAuth('header', 'X-Algolia-API-Key'), - appId: new ApiKeyAuth('header', 'X-Algolia-Application-Id'), - }; + 'apiKey': new ApiKeyAuth('header', 'X-Algolia-API-Key'), + 'appId': new ApiKeyAuth('header', 'X-Algolia-Application-Id'), + } private transporter: Transporter; - - private sendRequest( - request: Request, - requestOptions: RequestOptions - ): Promise { + + private sendRequest(request: Request, requestOptions: RequestOptions): Promise { if (this.authentications.apiKey.apiKey) { - this.authentications.apiKey.applyToRequest(requestOptions); + this.authentications.apiKey.applyToRequest(requestOptions); } - + if (this.authentications.appId.apiKey) { - this.authentications.appId.applyToRequest(requestOptions); + this.authentications.appId.applyToRequest(requestOptions); } - + return this.transporter.request(request, requestOptions); } constructor( - appId: string, - apiKey: string, - region?: string, - options?: { requester?: Requester; hosts?: Host[] } - ) { + appId: string, + apiKey: string, + region?: string, + options?: {requester?: Requester, hosts?: Host[]} + ) { this.setApiKey(PersonalizationApiKeys.appId, appId); this.setApiKey(PersonalizationApiKeys.apiKey, apiKey); this.transporter = new Transporter({ - hosts: options?.hosts ?? this.getDefaultHosts(region), + hosts: options?.hosts ?? this.getDefaultHosts( + + region + ), baseHeaders: { - 'content-type': 'application/x-www-form-urlencoded', + 'content-type': 'application/x-www-form-urlencoded' }, userAgent: 'Algolia for Javascript', timeouts: { @@ -59,48 +62,41 @@ export class PersonalizationApi { }); } - getDefaultHosts(region: string = 'us'): Host[] { - return [ - { - url: `personalization.${region}.algolia.com`, - accept: 'readWrite', - protocol: 'https', - }, - ]; + + public getDefaultHosts(region: string = 'us'): Host[] { + return [{ url: `personalization.${region}.algolia.com`, accept: 'readWrite', protocol: 'https' }]; } - setRequest(requester: Requester): void { + public setRequest(requester: Requester): void { this.transporter.setRequester(requester); } - setHosts(hosts: Host[]): void { + public setHosts(hosts: Host[]): void { this.transporter.setHosts(hosts); } - setApiKey(key: PersonalizationApiKeys, value: string): void { + public setApiKey(key: PersonalizationApiKeys, value: string): void { this.authentications[PersonalizationApiKeys[key]].apiKey = value; } /** - * Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed. - * - * @summary Delete the user profile and all its associated data. - * @param userToken - UserToken representing the user for which to fetch the Personalization profile. - */ - deleteUserProfile(userToken: string): Promise { + * Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed. + * @summary Delete the user profile and all its associated data. + * @param userToken userToken representing the user for which to fetch the Personalization profile. + */ + public deleteUserProfile (userToken: string, ) : Promise { const path = '/1/profiles/{userToken}'.replace( '{userToken}', encodeURIComponent(String(userToken)) ); - const headers: Headers = { Accept: 'application/json' }; - const queryParameters: Record = {}; + let headers: Headers = { Accept: 'application/json' }; + let queryParameters: Record = {}; if (userToken === null || userToken === undefined) { - throw new Error( - 'Required parameter userToken was null or undefined when calling deleteUserProfile.' - ); + throw new Error('Required parameter userToken was null or undefined when calling deleteUserProfile.'); } + const request: Request = { method: 'DELETE', path, @@ -108,20 +104,20 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters, + queryParameters }; return this.sendRequest(request, requestOptions); } /** - * The strategy contains information on the events and facets that impact user profiles and personalized search results. - * - * @summary Get the current personalization strategy. - */ - getPersonalizationStrategy(): Promise { + * The strategy contains information on the events and facets that impact user profiles and personalized search results. + * @summary Get the current personalization strategy. + */ + public getPersonalizationStrategy () : Promise { const path = '/1/strategies/personalization'; - const headers: Headers = { Accept: 'application/json' }; - const queryParameters: Record = {}; + let headers: Headers = { Accept: 'application/json' }; + let queryParameters: Record = {}; + const request: Request = { method: 'GET', @@ -130,31 +126,29 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters, + queryParameters }; return this.sendRequest(request, requestOptions); } /** - * The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes. - * - * @summary Get the user profile built from Personalization strategy. - * @param userToken - UserToken representing the user for which to fetch the Personalization profile. - */ - getUserTokenProfile(userToken: string): Promise { + * The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes. + * @summary Get the user profile built from Personalization strategy. + * @param userToken userToken representing the user for which to fetch the Personalization profile. + */ + public getUserTokenProfile (userToken: string, ) : Promise { const path = '/1/profiles/personalization/{userToken}'.replace( '{userToken}', encodeURIComponent(String(userToken)) ); - const headers: Headers = { Accept: 'application/json' }; - const queryParameters: Record = {}; + let headers: Headers = { Accept: 'application/json' }; + let queryParameters: Record = {}; if (userToken === null || userToken === undefined) { - throw new Error( - 'Required parameter userToken was null or undefined when calling getUserTokenProfile.' - ); + throw new Error('Required parameter userToken was null or undefined when calling getUserTokenProfile.'); } + const request: Request = { method: 'GET', path, @@ -162,33 +156,26 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters, + queryParameters }; return this.sendRequest(request, requestOptions); } /** - * A strategy defines the events and facets that impact user profiles and personalized search results. - * - * @summary Set a new personalization strategy. - * @param personalizationStrategyObject - The personalizationStrategyObject. - */ - setPersonalizationStrategy( - personalizationStrategyObject: PersonalizationStrategyObject - ): Promise { + * A strategy defines the events and facets that impact user profiles and personalized search results. + * @summary Set a new personalization strategy. + * @param personalizationStrategyObject The personalizationStrategyObject + */ + public setPersonalizationStrategy (personalizationStrategyObject: PersonalizationStrategyObject, ) : Promise { const path = '/1/strategies/personalization'; - const headers: Headers = { Accept: 'application/json' }; - const queryParameters: Record = {}; + let headers: Headers = { Accept: 'application/json' }; + let queryParameters: Record = {}; - if ( - personalizationStrategyObject === null || - personalizationStrategyObject === undefined - ) { - throw new Error( - 'Required parameter personalizationStrategyObject was null or undefined when calling setPersonalizationStrategy.' - ); + if (personalizationStrategyObject === null || personalizationStrategyObject === undefined) { + throw new Error('Required parameter personalizationStrategyObject was null or undefined when calling setPersonalizationStrategy.'); } + const request: Request = { method: 'POST', path, @@ -197,7 +184,7 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters, + queryParameters }; return this.sendRequest(request, requestOptions); diff --git a/specs/common/parameters.yml b/specs/common/parameters.yml index ac0faf7da69..4048de2d32b 100644 --- a/specs/common/parameters.yml +++ b/specs/common/parameters.yml @@ -54,6 +54,11 @@ abTestVariantID: type: integer description: If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used. +createdAt: + type: string + format: date-time + description: Date of creation (ISO-8601 format). + updatedAt: type: string format: date-time diff --git a/specs/search/common/parameters.yml b/specs/search/common/parameters.yml new file mode 100644 index 00000000000..a4f5a658d57 --- /dev/null +++ b/specs/search/common/parameters.yml @@ -0,0 +1,35 @@ +userID: + name: X-Algolia-User-ID + description: userID to assign. + in: header + required: true + schema: + type: string + pattern: '^[a-zA-Z0-9 \-\*\.]+$' + +users: + name: users + required: true + schema: + type: array + items: + type: string + +cluster: + name: cluster + description: Cluster name. + required: true + schema: + type: string + +page: + type: integer + description: Page to retrieve. + default: 0 + required: false + +hitsPerPage: + type: integer + description: The number of userIDs per page. + default: 1000 + required: false diff --git a/specs/search/common/schemas/Cluster.yml b/specs/search/common/schemas/Cluster.yml new file mode 100644 index 00000000000..396ed5faedb --- /dev/null +++ b/specs/search/common/schemas/Cluster.yml @@ -0,0 +1,16 @@ +cluster: + type: object + description: A cluster. + properties: + clusterName: + type: string + description: Cluster name. + example: "c11-test" + nbRecords: + type: integer + example: 3 + nbUserIDs: + type: integer + dataSize: + type: integer + example: 481 \ No newline at end of file diff --git a/specs/search/common/schemas/UserId.yml b/specs/search/common/schemas/UserId.yml new file mode 100644 index 00000000000..f5c3c8369f1 --- /dev/null +++ b/specs/search/common/schemas/UserId.yml @@ -0,0 +1,12 @@ +userId: + type: object + description: A userID. + properties: + userID: + type: string + clusterName: + type: string + nbRecords: + type: number + dataSize: + type: number \ No newline at end of file diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 6adb517bf4f..859703275ae 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -1 +1,34 @@ post: + tags: + - search + operationId: batchAssignUserIds + summary: Assign multiple userIDs to a cluster. + parameters: + - $ref: '../../common/parameters.yml#/userId' + requestBody: + required: true + content: + application/json: + schema: + $ref: './schemas.yml#/assignUserIdObject' + responses: + '200': + description: The operation has been taken into account, and the userIDs are directly usable. + content: + application/json: + schema: + title: assignUserIdResponse + type: object + additionalProperties: false + properties: + createdAt: + $ref: '../../../common/parameters.yml#/createdAt' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' + diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index 3ddb9d7f54d..ef89a23db60 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -1 +1,20 @@ get: + tags: + - search + operationId: getTopUserIds + summary: Get the top 10 userIDs with the highest number of records per cluster. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: './schemas.yml#/getTopUserIdsReponse' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 3ddb9d7f54d..29557d0ea18 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -1 +1,29 @@ get: + tags: + - search + operationId: hasPendingMappins + summary: Get the status of your clusters’ migrations or user creations. + parameters: + - in: query + name: getClusters + schema: + type: boolean + responses: + '200': + description: The operation has been taken into account, and the userIDs are directly usable. + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + createdAt: + $ref: '../../../common/parameters.yml#/createdAt' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 3ddb9d7f54d..247d0d8a66a 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -1 +1,20 @@ get: + tags: + - search + operationId: listClusters + summary: List the clusters available in a multi-clusters setup for a single appID. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: './schemas.yml#/listClustersReponse' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml new file mode 100644 index 00000000000..ea8eae5e8eb --- /dev/null +++ b/specs/search/paths/multiclusters/schemas.yml @@ -0,0 +1,145 @@ +page: + type: integer + description: Current page. + example: 0 + +nbHits: + type: integer + description: Number of hits that the search query matched. + example: 20 + +assignUserIdObject: + type: object + description: Assign userID object. + additionalProperties: false + properties: + cluster: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + +listUserIdsReponse: + type: object + description: UserIDs data. + properties: + userIDs: + type: array + items: + $ref: '../../common/schemas/UserId.yml#/userId' + +batchAssignUserIdsObject: + type: object + description: Assign userID object. + additionalProperties: false + properties: + cluster: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + users: + type: array + items: + type: string + +getTopUserIdsReponse: + type: object + description: Array of userIDs and clusters. + properties: + topUsers: + type: array + items: + type: object + patternProperties: + '^.*$': + $ref: '../../common/schemas/UserId.yml#/userId' + +getUserIdReponse: + type: object + description: userID data. + properties: + $ref: '../../common/schemas/UserId.yml#/userId' + +listClustersReponse: + type: object + description: Array of clusters. + properties: + topUsers: + type: array + items: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + +searchUserIdsObject: + type: object + description: Search userID object. + additionalProperties: false + properties: + query: + type: string + required: true + description: Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. + clusterName: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + page: + $ref: '#/page' + hitsPerPage: + $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' + +searchUserIdsReponse: + type: object + description: userIDs data. + properties: + hits: + type: array + description: List of user object matching the query. + items: + type: object + properties: + userID: + type: string + example: "user9" + clusterName: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + nbRecords: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.nbRecords' + dataSize: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.dataSize' + objectID: + type: string + example: "user9" + "_highlightResult": + type: object + properties: + userID: + type: object + properties: + value: + type: string + example: "user<\/b>9" + matchLevel: + type: string + example: "full" + fullyHightlited: + type: boolean + example: false + matchedWords: + type: array + items: + type: string + clusterName: + type: object + properties: + value: + type: string + example: "c11-test" + matchLevel: + type: string + example: "none" + matchedWords: + type: array + items: + type: string + nbHits: + $ref: '#/nbHits' + page: + $ref: '#/page' + hitsPerPage: + $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' + updatedAt: + $ref: '../../../common/parameters.yml#/updatedAt' + \ No newline at end of file diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 6adb517bf4f..40dc9d0f9ef 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -1 +1,31 @@ post: + tags: + - search + operationId: searchUserIds + summary: Search for userIDs. + requestBody: + required: true + content: + application/json: + schema: + $ref: './schemas.yml#/searchUserIdsObject' + responses: + '200': + description: OK + content: + application/json: + schema: + title: assignUserIdResponse + type: object + additionalProperties: false + properties: + createdAt: + $ref: '../../../common/parameters.yml#/createdAt' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 4a951176922..021af86246d 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -1,2 +1,48 @@ get: + tags: + - search + operationId: getUserId + summary: Returns the userID data stored in the mapping. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: './schemas.yml#/getUserIdReponse' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' + delete: + tags: + - search + operationId: removeUserId + summary: Remove a userID and its associated data from the multi-clusters. + parameters: + - $ref: '../../common/parameters.yml#/userId' + responses: + '200': + description: A task is created to remove the userID data and mapping + content: + application/json: + schema: + title: removeUserIdResponse + type: object + additionalProperties: false + properties: + deletedAt: + $ref: '../../../common/parameters.yml#/deletedAt' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 9791372547a..3b65fdfd9a0 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -1,2 +1,58 @@ post: + tags: + - search + operationId: assignUserId + summary: Assign or Move a userID to a cluster. + parameters: + - $ref: '../../common/parameters.yml#/userId' + - $ref: '../../common/parameters.yml#/cluster' + requestBody: + required: true + content: + application/json: + schema: + $ref: './schemas.yml#/assignUserIdObject' + responses: + '200': + description: The operation has been taken into account, and the userID is directly usable. + content: + application/json: + schema: + title: assignUserIdResponse + type: object + additionalProperties: false + properties: + createdAt: + $ref: '../../../common/parameters.yml#/createdAt' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' + get: + tags: + - search + operationId: listUserIds + summary: List the userIDs assigned to a multi-clusters appID. + parameters: + - $ref: '../../common/parameters.yml#/page' + - $ref: '../../common/parameters.yml#/hitsPerPage' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: './schemas.yml#/listUserIdsResponse' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/spec.yml b/specs/search/spec.yml index e75bddb1848..a303f88b228 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -20,8 +20,8 @@ paths: $ref: './paths/search/search.yml' /1/indexes/*/queries: $ref: './paths/search/multipleQueries.yml' - # /1/indexes/{indexName}/facets/{facetName}/query: - # $ref: './paths/search/searchForFacetValues.yml' + /1/indexes/{indexName}/facets/{facetName}/query: + $ref: './paths/search/searchForFacetValues.yml' # /1/indexes/{indexName}/browse: # $ref: './paths/search/browse.yml' @@ -102,20 +102,20 @@ paths: # ############################### # ### MultiClusters Endpoints ### # ############################### - # /1/clusters/mapping: - # $ref: './paths/multiclusters/userIds.yml' - # /1/clusters/mapping/batch: - # $ref: './paths/multiclusters/batchAssignUserIds.yml' - # /1/clusters/mapping/top: - # $ref: './paths/multiclusters/getTopUserIds.yml' - # /1/clusters/mapping/{userID}: - # $ref: './paths/multiclusters/userId.yml' - # /1/clusters: - # $ref: './paths/multiclusters/listClusters.yml' - # /1/clusters/mapping/search: - # $ref: './paths/multiclusters/searchUserIds.yml' - # /1/clusters/mapping/pending: - # $ref: './paths/multiclusters/hasPendingMappings.yml' + /1/clusters/mapping: + $ref: './paths/multiclusters/userIds.yml' + /1/clusters/mapping/batch: + $ref: './paths/multiclusters/batchAssignUserIds.yml' + /1/clusters/mapping/top: + $ref: './paths/multiclusters/getTopUserIds.yml' + /1/clusters/mapping/{userID}: + $ref: './paths/multiclusters/userId.yml' + /1/clusters: + $ref: './paths/multiclusters/listClusters.yml' + /1/clusters/mapping/search: + $ref: './paths/multiclusters/searchUserIds.yml' + /1/clusters/mapping/pending: + $ref: './paths/multiclusters/hasPendingMappings.yml' # ####################### # ### Vault Endpoints ### From fafaff07c3aa5da3413bbe7349b32d696ed55662 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Fri, 10 Dec 2021 17:35:14 +0100 Subject: [PATCH 02/28] Added multiclusters endpoints for the search client --- specs/search/spec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/search/spec.yml b/specs/search/spec.yml index a303f88b228..f565b9985e9 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -20,8 +20,8 @@ paths: $ref: './paths/search/search.yml' /1/indexes/*/queries: $ref: './paths/search/multipleQueries.yml' - /1/indexes/{indexName}/facets/{facetName}/query: - $ref: './paths/search/searchForFacetValues.yml' + # /1/indexes/{indexName}/facets/{facetName}/query: + # $ref: './paths/search/searchForFacetValues.yml' # /1/indexes/{indexName}/browse: # $ref: './paths/search/browse.yml' From a13b2ba5b4dbf199214faa0eef024a87c1ac114b Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Mon, 13 Dec 2021 13:14:12 +0100 Subject: [PATCH 03/28] Added multiclusters endpoints for the search client --- specs/common/parameters.yml | 2 +- specs/search/common/schemas/Cluster.yml | 2 +- specs/search/common/schemas/UserId.yml | 2 +- .../paths/multiclusters/batchAssignUserIds.yml | 2 +- specs/search/paths/multiclusters/schemas.yml | 15 +++++++-------- specs/search/paths/multiclusters/userId.yml | 2 +- specs/search/paths/multiclusters/userIds.yml | 2 +- specs/search/paths/objects/objects.yml | 4 ++-- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/specs/common/parameters.yml b/specs/common/parameters.yml index 4048de2d32b..0557766ff2d 100644 --- a/specs/common/parameters.yml +++ b/specs/common/parameters.yml @@ -64,7 +64,7 @@ updatedAt: format: date-time description: Date of last update (ISO-8601 format). -deleteAt: +deletedAt: type: string format: date-time description: Date of deletion (ISO-8601 format). diff --git a/specs/search/common/schemas/Cluster.yml b/specs/search/common/schemas/Cluster.yml index 396ed5faedb..0413661aae0 100644 --- a/specs/search/common/schemas/Cluster.yml +++ b/specs/search/common/schemas/Cluster.yml @@ -13,4 +13,4 @@ cluster: type: integer dataSize: type: integer - example: 481 \ No newline at end of file + example: 481 diff --git a/specs/search/common/schemas/UserId.yml b/specs/search/common/schemas/UserId.yml index f5c3c8369f1..37909b38e1f 100644 --- a/specs/search/common/schemas/UserId.yml +++ b/specs/search/common/schemas/UserId.yml @@ -9,4 +9,4 @@ userId: nbRecords: type: number dataSize: - type: number \ No newline at end of file + type: number diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 859703275ae..21c8ad88971 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -4,7 +4,7 @@ post: operationId: batchAssignUserIds summary: Assign multiple userIDs to a cluster. parameters: - - $ref: '../../common/parameters.yml#/userId' + - $ref: '../../common/parameters.yml#/userID' requestBody: required: true content: diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml index ea8eae5e8eb..b8439ddef37 100644 --- a/specs/search/paths/multiclusters/schemas.yml +++ b/specs/search/paths/multiclusters/schemas.yml @@ -14,9 +14,9 @@ assignUserIdObject: additionalProperties: false properties: cluster: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' -listUserIdsReponse: +listUserIdsResponse: type: object description: UserIDs data. properties: @@ -31,7 +31,7 @@ batchAssignUserIdsObject: additionalProperties: false properties: cluster: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' users: type: array items: @@ -62,7 +62,7 @@ listClustersReponse: topUsers: type: array items: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' searchUserIdsObject: type: object @@ -74,7 +74,7 @@ searchUserIdsObject: required: true description: Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. clusterName: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' page: $ref: '#/page' hitsPerPage: @@ -94,7 +94,7 @@ searchUserIdsReponse: type: string example: "user9" clusterName: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.clusterName' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' nbRecords: $ref: '../../common/schemas/Cluster.yml#/cluster.properties.nbRecords' dataSize: @@ -110,7 +110,7 @@ searchUserIdsReponse: properties: value: type: string - example: "user<\/b>9" + example: 'user<\/b>9' matchLevel: type: string example: "full" @@ -142,4 +142,3 @@ searchUserIdsReponse: $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' updatedAt: $ref: '../../../common/parameters.yml#/updatedAt' - \ No newline at end of file diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 021af86246d..57fcdee17f3 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -25,7 +25,7 @@ delete: operationId: removeUserId summary: Remove a userID and its associated data from the multi-clusters. parameters: - - $ref: '../../common/parameters.yml#/userId' + - $ref: '../../common/parameters.yml#/userID' responses: '200': description: A task is created to remove the userID data and mapping diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 3b65fdfd9a0..3be1281becd 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -4,7 +4,7 @@ post: operationId: assignUserId summary: Assign or Move a userID to a cluster. parameters: - - $ref: '../../common/parameters.yml#/userId' + - $ref: '../../common/parameters.yml#/userID' - $ref: '../../common/parameters.yml#/cluster' requestBody: required: true diff --git a/specs/search/paths/objects/objects.yml b/specs/search/paths/objects/objects.yml index 4058193b6c3..95f5cacd199 100644 --- a/specs/search/paths/objects/objects.yml +++ b/specs/search/paths/objects/objects.yml @@ -58,8 +58,8 @@ delete: properties: taskID: $ref: '../../../common/parameters.yml#/taskID' - deleteAt: - $ref: '../../../common/parameters.yml#/deleteAt' + deletedAt: + $ref: '../../../common/parameters.yml#/deletedAt' '400': $ref: '../../../common/responses/BadRequest.yml' '402': From 4c25cf5ddaefd603f9fb40243100286d13815981 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Mon, 13 Dec 2021 15:49:54 +0100 Subject: [PATCH 04/28] Added multiclusters endpoints for the search client --- specs/search/common/parameters.yml | 25 ++++++---------- specs/search/common/schemas/UserId.yml | 8 +++-- .../search/paths/multiclusters/getUserId.yml | 20 +++++++++++++ specs/search/paths/multiclusters/schemas.yml | 22 +++++--------- specs/search/paths/multiclusters/userId.yml | 28 ------------------ specs/search/paths/multiclusters/userIds.yml | 29 ++++++++++++++++++- 6 files changed, 71 insertions(+), 61 deletions(-) create mode 100644 specs/search/paths/multiclusters/getUserId.yml diff --git a/specs/search/common/parameters.yml b/specs/search/common/parameters.yml index a4f5a658d57..68899657547 100644 --- a/specs/search/common/parameters.yml +++ b/specs/search/common/parameters.yml @@ -1,7 +1,7 @@ userID: name: X-Algolia-User-ID description: userID to assign. - in: header + in: query required: true schema: type: string @@ -15,21 +15,14 @@ users: items: type: string -cluster: - name: cluster - description: Cluster name. - required: true - schema: - type: string - page: - type: integer - description: Page to retrieve. - default: 0 - required: false + name: page + in: query + schema: + $ref: './schemas/SearchParams.yml#/baseSearchParams/properties/page' hitsPerPage: - type: integer - description: The number of userIDs per page. - default: 1000 - required: false + name: hitsPerPage + in: query + schema: + $ref: './schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' diff --git a/specs/search/common/schemas/UserId.yml b/specs/search/common/schemas/UserId.yml index 37909b38e1f..905721ea1ec 100644 --- a/specs/search/common/schemas/UserId.yml +++ b/specs/search/common/schemas/UserId.yml @@ -4,9 +4,13 @@ userId: properties: userID: type: string + example: 'user1' clusterName: type: string + example: 'c1-test' nbRecords: - type: number + type: integer + example: 42 dataSize: - type: number + type: integer + example: 0 diff --git a/specs/search/paths/multiclusters/getUserId.yml b/specs/search/paths/multiclusters/getUserId.yml new file mode 100644 index 00000000000..2474ffadc22 --- /dev/null +++ b/specs/search/paths/multiclusters/getUserId.yml @@ -0,0 +1,20 @@ +get: + tags: + - search + operationId: getUserId + summary: Returns the userID data stored in the mapping. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: './schemas.yml#/getUserIdReponse' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml index b8439ddef37..c7e530fd257 100644 --- a/specs/search/paths/multiclusters/schemas.yml +++ b/specs/search/paths/multiclusters/schemas.yml @@ -1,8 +1,3 @@ -page: - type: integer - description: Current page. - example: 0 - nbHits: type: integer description: Number of hits that the search query matched. @@ -45,15 +40,13 @@ getTopUserIdsReponse: type: array items: type: object - patternProperties: - '^.*$': + additionalProperties: + type: array + items: $ref: '../../common/schemas/UserId.yml#/userId' getUserIdReponse: - type: object - description: userID data. - properties: - $ref: '../../common/schemas/UserId.yml#/userId' + $ref: '../../common/schemas/UserId.yml#/userId' listClustersReponse: type: object @@ -71,14 +64,15 @@ searchUserIdsObject: properties: query: type: string - required: true description: Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' page: - $ref: '#/page' + $ref: '../../common/schemas/SearchParams.yml#/baseSearchParams/properties/page' hitsPerPage: $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' + required: + - query searchUserIdsReponse: type: object @@ -137,7 +131,7 @@ searchUserIdsReponse: nbHits: $ref: '#/nbHits' page: - $ref: '#/page' + $ref: '../../common/schemas/SearchParams.yml#/baseSearchParams/properties/page' hitsPerPage: $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' updatedAt: diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 57fcdee17f3..2474ffadc22 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -18,31 +18,3 @@ get: $ref: '../../../common/responses/MethodNotAllowed.yml' '404': $ref: '../../../common/responses/IndexNotFound.yml' - -delete: - tags: - - search - operationId: removeUserId - summary: Remove a userID and its associated data from the multi-clusters. - parameters: - - $ref: '../../common/parameters.yml#/userID' - responses: - '200': - description: A task is created to remove the userID data and mapping - content: - application/json: - schema: - title: removeUserIdResponse - type: object - additionalProperties: false - properties: - deletedAt: - $ref: '../../../common/parameters.yml#/deletedAt' - '400': - $ref: '../../../common/responses/BadRequest.yml' - '402': - $ref: '../../../common/responses/FeatureNotEnabled.yml' - '403': - $ref: '../../../common/responses/MethodNotAllowed.yml' - '404': - $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 3be1281becd..3bd881d5253 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -5,7 +5,6 @@ post: summary: Assign or Move a userID to a cluster. parameters: - $ref: '../../common/parameters.yml#/userID' - - $ref: '../../common/parameters.yml#/cluster' requestBody: required: true content: @@ -56,3 +55,31 @@ get: $ref: '../../../common/responses/MethodNotAllowed.yml' '404': $ref: '../../../common/responses/IndexNotFound.yml' + +delete: + tags: + - search + operationId: removeUserId + summary: Remove a userID and its associated data from the multi-clusters. + parameters: + - $ref: '../../common/parameters.yml#/userID' + responses: + '200': + description: A task is created to remove the userID data and mapping + content: + application/json: + schema: + title: removeUserIdResponse + type: object + additionalProperties: false + properties: + deletedAt: + $ref: '../../../common/parameters.yml#/deletedAt' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' From 40775a73ce4373b38a35e044e4c20a7c2e7db87e Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Mon, 13 Dec 2021 16:04:40 +0100 Subject: [PATCH 05/28] feat: run linter --- specs/search/common/schemas/Cluster.yml | 2 +- .../paths/multiclusters/batchAssignUserIds.yml | 1 - specs/search/paths/multiclusters/schemas.yml | 12 ++++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/specs/search/common/schemas/Cluster.yml b/specs/search/common/schemas/Cluster.yml index 0413661aae0..20d694eff10 100644 --- a/specs/search/common/schemas/Cluster.yml +++ b/specs/search/common/schemas/Cluster.yml @@ -5,7 +5,7 @@ cluster: clusterName: type: string description: Cluster name. - example: "c11-test" + example: 'c11-test' nbRecords: type: integer example: 3 diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 21c8ad88971..9872ec85a7c 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -31,4 +31,3 @@ post: $ref: '../../../common/responses/MethodNotAllowed.yml' '404': $ref: '../../../common/responses/IndexNotFound.yml' - diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml index c7e530fd257..f16bccf1621 100644 --- a/specs/search/paths/multiclusters/schemas.yml +++ b/specs/search/paths/multiclusters/schemas.yml @@ -86,7 +86,7 @@ searchUserIdsReponse: properties: userID: type: string - example: "user9" + example: 'user9' clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' nbRecords: @@ -95,8 +95,8 @@ searchUserIdsReponse: $ref: '../../common/schemas/Cluster.yml#/cluster.properties.dataSize' objectID: type: string - example: "user9" - "_highlightResult": + example: 'user9' + '_highlightResult': type: object properties: userID: @@ -107,7 +107,7 @@ searchUserIdsReponse: example: 'user<\/b>9' matchLevel: type: string - example: "full" + example: 'full' fullyHightlited: type: boolean example: false @@ -120,10 +120,10 @@ searchUserIdsReponse: properties: value: type: string - example: "c11-test" + example: 'c11-test' matchLevel: type: string - example: "none" + example: 'none' matchedWords: type: array items: From 4fd29ba95bb8edebed8144087ba3ba5863ff68ee Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Mon, 13 Dec 2021 18:04:56 +0100 Subject: [PATCH 06/28] feat: capitalize parameters, link page to common definition, add descriptions --- .../model/deleteUserProfileResponse.ts | 22 +- .../client-personalization/model/errorBase.ts | 12 +- .../model/eventScoring.ts | 30 +- .../model/facetScoring.ts | 22 +- .../model/getUserTokenResponse.ts | 30 +- .../client-personalization/model/models.ts | 51 +-- .../model/personalizationStrategyObject.ts | 33 +- .../setPersonalizationStrategyResponse.ts | 14 +- .../client-personalization/src/apis.ts | 3 +- .../src/personalizationApi.ts | 161 +++++----- .../client-search/model/assignUserIdObject.ts | 9 + .../model/assignUserIdResponse.ts | 6 + .../model/deleteIndexResponse.ts | 2 +- .../model/getTopUserIdsReponse.ts | 8 + .../client-search/model/inlineResponse200.ts | 6 + .../model/listClustersReponse.ts | 6 + .../model/listUserIdsResponse.ts | 8 + .../client-search/model/models.ts | 9 + .../model/removeUserIdResponse.ts | 6 + .../model/searchUserIdsObject.ts | 21 ++ .../client-search/model/userId.ts | 9 + .../client-search/src/searchApi.ts | 302 ++++++++++++++++++ specs/common/parameters.yml | 7 + specs/search/common/parameters.yml | 40 +-- .../multiclusters/batchAssignUserIds.yml | 3 +- .../paths/multiclusters/getTopUserIds.yml | 1 + .../search/paths/multiclusters/getUserId.yml | 1 + .../multiclusters/hasPendingMappings.yml | 1 + .../paths/multiclusters/listClusters.yml | 1 + specs/search/paths/multiclusters/schemas.yml | 18 +- .../paths/multiclusters/searchUserIds.yml | 1 + specs/search/paths/multiclusters/userId.yml | 3 + specs/search/paths/multiclusters/userIds.yml | 11 +- 33 files changed, 637 insertions(+), 220 deletions(-) create mode 100644 clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsReponse.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/listClustersReponse.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/userId.ts diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts b/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts index 64d960a89e3..45abf172e54 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/deleteUserProfileResponse.ts @@ -1,14 +1,10 @@ - - - export type DeleteUserProfileResponse = { - /** - * userToken representing the user for which to fetch the Personalization profile. - */ - userToken: string; - /** - * A date until which the data can safely be considered as deleted for the given user. Any data received after the deletedUntil date will start building a new user profile. - */ - deletedUntil: Date; -} - + /** + * UserToken representing the user for which to fetch the Personalization profile. + */ + userToken: string; + /** + * A date until which the data can safely be considered as deleted for the given user. Any data received after the deletedUntil date will start building a new user profile. + */ + deletedUntil: Date; +}; diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts b/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts index 95cfaefec34..a533aa7a151 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/errorBase.ts @@ -1,10 +1,6 @@ - - - /** -* Error. -*/ + * Error. + */ export type ErrorBase = { - message?: string; -} - + message?: string; +}; diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts b/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts index abf71f5e59b..277ce92eb90 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/eventScoring.ts @@ -1,18 +1,14 @@ - - - export type EventScoring = { - /** - * The score for the event. - */ - score: number; - /** - * The name of the event. - */ - eventName: string; - /** - * The type of the event. - */ - eventType: string; -} - + /** + * The score for the event. + */ + score: number; + /** + * The name of the event. + */ + eventName: string; + /** + * The type of the event. + */ + eventType: string; +}; diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts b/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts index 9d38f026ff5..ae2c9d1b5e0 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/facetScoring.ts @@ -1,14 +1,10 @@ - - - export type FacetScoring = { - /** - * The score for the event. - */ - score: number; - /** - * The name of the facet. - */ - facetName: string; -} - + /** + * The score for the event. + */ + score: number; + /** + * The name of the facet. + */ + facetName: string; +}; diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts b/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts index 6b9ff1c3029..6da93391d46 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/getUserTokenResponse.ts @@ -1,18 +1,14 @@ - - - export type GetUserTokenResponse = { - /** - * userToken representing the user for which to fetch the Personalization profile. - */ - userToken: string; - /** - * Date of last event update. (ISO-8601 format) - */ - lastEventAt: Date; - /** - * The userToken scores. - */ - scores: { [key: string]: object; }; -} - + /** + * UserToken representing the user for which to fetch the Personalization profile. + */ + userToken: string; + /** + * Date of last event update. (ISO-8601 format). + */ + lastEventAt: Date; + /** + * The userToken scores. + */ + scores: { [key: string]: Record }; +}; diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/models.ts b/clients/algoliasearch-client-javascript/client-personalization/model/models.ts index 981743246fb..3260c5c0fb7 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/models.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/models.ts @@ -9,32 +9,41 @@ export * from './getUserTokenResponse'; export * from './personalizationStrategyObject'; export * from './setPersonalizationStrategyResponse'; - export interface Authentication { - /** - * Apply authentication settings to header and query params. - */ - applyToRequest(requestOptions: RequestOptions): Promise | void; + /** + * Apply authentication settings to header and query params. + */ + applyToRequest: (requestOptions: RequestOptions) => Promise | void; } export class ApiKeyAuth implements Authentication { - public apiKey: string = ''; + apiKey: string = ''; - constructor(private location: string, private paramName: string) { - } + constructor(private location: string, private paramName: string) {} - applyToRequest(requestOptions: RequestOptions): void { - if (this.location === "query") { - requestOptions.queryParameters[this.paramName] = this.apiKey; - } else if (this.location === "header" && requestOptions && requestOptions.headers) { - requestOptions.headers[this.paramName] = this.apiKey; - } else if (this.location === 'cookie' && requestOptions && requestOptions.headers) { - if (requestOptions.headers['Cookie']) { - requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); - } - else { - requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); - } - } + applyToRequest(requestOptions: RequestOptions): void { + if (this.location === 'query') { + requestOptions.queryParameters[this.paramName] = this.apiKey; + } else if ( + this.location === 'header' && + requestOptions && + requestOptions.headers + ) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if ( + this.location === 'cookie' && + requestOptions && + requestOptions.headers + ) { + if (requestOptions.headers.Cookie) { + requestOptions.headers.Cookie += `; ${ + this.paramName + }=${encodeURIComponent(this.apiKey)}`; + } else { + requestOptions.headers.Cookie = `${this.paramName}=${encodeURIComponent( + this.apiKey + )}`; + } } + } } diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts b/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts index d458f1f342a..db6606a01d1 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts @@ -1,20 +1,17 @@ -import { EventScoring } from './eventScoring'; -import { FacetScoring } from './facetScoring'; - - +import type { EventScoring } from './eventScoring'; +import type { FacetScoring } from './facetScoring'; export type PersonalizationStrategyObject = { - /** - * Scores associated with the events. - */ - eventScoring: Array; - /** - * Scores associated with the facets. - */ - facetScoring: Array; - /** - * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled). - */ - personalizationImpact: number; -} - + /** + * Scores associated with the events. + */ + eventScoring: EventScoring[]; + /** + * Scores associated with the facets. + */ + facetScoring: FacetScoring[]; + /** + * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled). + */ + personalizationImpact: number; +}; diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts b/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts index fb22c7974a1..4eaa97be655 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategyResponse.ts @@ -1,10 +1,6 @@ - - - export type SetPersonalizationStrategyResponse = { - /** - * A message confirming the strategy update. - */ - message: string; -} - + /** + * A message confirming the strategy update. + */ + message: string; +}; diff --git a/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts b/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts index 3189fb214e3..7fba93227be 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/src/apis.ts @@ -1,5 +1,6 @@ -export * from './personalizationApi'; import { PersonalizationApi } from './personalizationApi'; + +export * from './personalizationApi'; export * from '../utils/errors'; export { EchoRequester } from '../utils/requester/EchoRequester'; diff --git a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts index dc610e08b6f..8ecc4c7a9f5 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts @@ -1,14 +1,11 @@ -import { shuffle } from '../utils/helpers'; -import { Transporter } from '../utils/Transporter'; -import { Headers, Host, Request, RequestOptions } from '../utils/types'; -import { Requester } from '../utils/requester/Requester'; - -import { DeleteUserProfileResponse } from '../model/deleteUserProfileResponse'; -import { ErrorBase } from '../model/errorBase'; -import { GetUserTokenResponse } from '../model/getUserTokenResponse'; -import { PersonalizationStrategyObject } from '../model/personalizationStrategyObject'; -import { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse'; +import type { DeleteUserProfileResponse } from '../model/deleteUserProfileResponse'; +import type { GetUserTokenResponse } from '../model/getUserTokenResponse'; import { ApiKeyAuth } from '../model/models'; +import type { PersonalizationStrategyObject } from '../model/personalizationStrategyObject'; +import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse'; +import { Transporter } from '../utils/Transporter'; +import type { Requester } from '../utils/requester/Requester'; +import type { Headers, Host, Request, RequestOptions } from '../utils/types'; export enum PersonalizationApiKeys { apiKey, @@ -17,40 +14,40 @@ export enum PersonalizationApiKeys { export class PersonalizationApi { protected authentications = { - 'apiKey': new ApiKeyAuth('header', 'X-Algolia-API-Key'), - 'appId': new ApiKeyAuth('header', 'X-Algolia-Application-Id'), - } + apiKey: new ApiKeyAuth('header', 'X-Algolia-API-Key'), + appId: new ApiKeyAuth('header', 'X-Algolia-Application-Id'), + }; private transporter: Transporter; - - private sendRequest(request: Request, requestOptions: RequestOptions): Promise { + + private sendRequest( + request: Request, + requestOptions: RequestOptions + ): Promise { if (this.authentications.apiKey.apiKey) { - this.authentications.apiKey.applyToRequest(requestOptions); + this.authentications.apiKey.applyToRequest(requestOptions); } - + if (this.authentications.appId.apiKey) { - this.authentications.appId.applyToRequest(requestOptions); + this.authentications.appId.applyToRequest(requestOptions); } - + return this.transporter.request(request, requestOptions); } constructor( - appId: string, - apiKey: string, - region?: string, - options?: {requester?: Requester, hosts?: Host[]} - ) { + appId: string, + apiKey: string, + region?: string, + options?: { requester?: Requester; hosts?: Host[] } + ) { this.setApiKey(PersonalizationApiKeys.appId, appId); this.setApiKey(PersonalizationApiKeys.apiKey, apiKey); this.transporter = new Transporter({ - hosts: options?.hosts ?? this.getDefaultHosts( - - region - ), + hosts: options?.hosts ?? this.getDefaultHosts(region), baseHeaders: { - 'content-type': 'application/x-www-form-urlencoded' + 'content-type': 'application/x-www-form-urlencoded', }, userAgent: 'Algolia for Javascript', timeouts: { @@ -62,41 +59,48 @@ export class PersonalizationApi { }); } - - public getDefaultHosts(region: string = 'us'): Host[] { - return [{ url: `personalization.${region}.algolia.com`, accept: 'readWrite', protocol: 'https' }]; + getDefaultHosts(region: string = 'us'): Host[] { + return [ + { + url: `personalization.${region}.algolia.com`, + accept: 'readWrite', + protocol: 'https', + }, + ]; } - public setRequest(requester: Requester): void { + setRequest(requester: Requester): void { this.transporter.setRequester(requester); } - public setHosts(hosts: Host[]): void { + setHosts(hosts: Host[]): void { this.transporter.setHosts(hosts); } - public setApiKey(key: PersonalizationApiKeys, value: string): void { + setApiKey(key: PersonalizationApiKeys, value: string): void { this.authentications[PersonalizationApiKeys[key]].apiKey = value; } /** - * Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed. - * @summary Delete the user profile and all its associated data. - * @param userToken userToken representing the user for which to fetch the Personalization profile. - */ - public deleteUserProfile (userToken: string, ) : Promise { + * Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed. + * + * @summary Delete the user profile and all its associated data. + * @param userToken - UserToken representing the user for which to fetch the Personalization profile. + */ + deleteUserProfile(userToken: string): Promise { const path = '/1/profiles/{userToken}'.replace( '{userToken}', encodeURIComponent(String(userToken)) ); - let headers: Headers = { Accept: 'application/json' }; - let queryParameters: Record = {}; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; if (userToken === null || userToken === undefined) { - throw new Error('Required parameter userToken was null or undefined when calling deleteUserProfile.'); + throw new Error( + 'Required parameter userToken was null or undefined when calling deleteUserProfile.' + ); } - const request: Request = { method: 'DELETE', path, @@ -104,20 +108,20 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters + queryParameters, }; return this.sendRequest(request, requestOptions); } /** - * The strategy contains information on the events and facets that impact user profiles and personalized search results. - * @summary Get the current personalization strategy. - */ - public getPersonalizationStrategy () : Promise { + * The strategy contains information on the events and facets that impact user profiles and personalized search results. + * + * @summary Get the current personalization strategy. + */ + getPersonalizationStrategy(): Promise { const path = '/1/strategies/personalization'; - let headers: Headers = { Accept: 'application/json' }; - let queryParameters: Record = {}; - + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; const request: Request = { method: 'GET', @@ -126,29 +130,31 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters + queryParameters, }; return this.sendRequest(request, requestOptions); } /** - * The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes. - * @summary Get the user profile built from Personalization strategy. - * @param userToken userToken representing the user for which to fetch the Personalization profile. - */ - public getUserTokenProfile (userToken: string, ) : Promise { + * The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes. + * + * @summary Get the user profile built from Personalization strategy. + * @param userToken - UserToken representing the user for which to fetch the Personalization profile. + */ + getUserTokenProfile(userToken: string): Promise { const path = '/1/profiles/personalization/{userToken}'.replace( '{userToken}', encodeURIComponent(String(userToken)) ); - let headers: Headers = { Accept: 'application/json' }; - let queryParameters: Record = {}; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; if (userToken === null || userToken === undefined) { - throw new Error('Required parameter userToken was null or undefined when calling getUserTokenProfile.'); + throw new Error( + 'Required parameter userToken was null or undefined when calling getUserTokenProfile.' + ); } - const request: Request = { method: 'GET', path, @@ -156,26 +162,33 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters + queryParameters, }; return this.sendRequest(request, requestOptions); } /** - * A strategy defines the events and facets that impact user profiles and personalized search results. - * @summary Set a new personalization strategy. - * @param personalizationStrategyObject The personalizationStrategyObject - */ - public setPersonalizationStrategy (personalizationStrategyObject: PersonalizationStrategyObject, ) : Promise { + * A strategy defines the events and facets that impact user profiles and personalized search results. + * + * @summary Set a new personalization strategy. + * @param personalizationStrategyObject - The personalizationStrategyObject. + */ + setPersonalizationStrategy( + personalizationStrategyObject: PersonalizationStrategyObject + ): Promise { const path = '/1/strategies/personalization'; - let headers: Headers = { Accept: 'application/json' }; - let queryParameters: Record = {}; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; - if (personalizationStrategyObject === null || personalizationStrategyObject === undefined) { - throw new Error('Required parameter personalizationStrategyObject was null or undefined when calling setPersonalizationStrategy.'); + if ( + personalizationStrategyObject === null || + personalizationStrategyObject === undefined + ) { + throw new Error( + 'Required parameter personalizationStrategyObject was null or undefined when calling setPersonalizationStrategy.' + ); } - const request: Request = { method: 'POST', path, @@ -184,7 +197,7 @@ export class PersonalizationApi { const requestOptions: RequestOptions = { headers, - queryParameters + queryParameters, }; return this.sendRequest(request, requestOptions); diff --git a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts new file mode 100644 index 00000000000..957cec4f80b --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts @@ -0,0 +1,9 @@ +/** + * Assign userID object. + */ +export type AssignUserIdObject = { + /** + * Cluster name. + */ + cluster?: string; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts new file mode 100644 index 00000000000..ad7d6d1ee6c --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts @@ -0,0 +1,6 @@ +export type AssignUserIdResponse = { + /** + * Date of creation (ISO-8601 format). + */ + createdAt?: Date; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/deleteIndexResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/deleteIndexResponse.ts index 4bc23f433f8..b03c54272b6 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/deleteIndexResponse.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/deleteIndexResponse.ts @@ -6,5 +6,5 @@ export type DeleteIndexResponse = { /** * Date of deletion (ISO-8601 format). */ - deleteAt?: Date; + deletedAt?: Date; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsReponse.ts b/clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsReponse.ts new file mode 100644 index 00000000000..68498b42270 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsReponse.ts @@ -0,0 +1,8 @@ +import type { UserId } from './userId'; + +/** + * Array of userIDs and clusters. + */ +export type GetTopUserIdsReponse = { + topUsers?: Array<{ [key: string]: UserId[] }>; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts new file mode 100644 index 00000000000..1d4394a5136 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts @@ -0,0 +1,6 @@ +export type InlineResponse200 = { + /** + * Date of creation (ISO-8601 format). + */ + createdAt?: Date; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/listClustersReponse.ts b/clients/algoliasearch-client-javascript/client-search/model/listClustersReponse.ts new file mode 100644 index 00000000000..708df461f4e --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/listClustersReponse.ts @@ -0,0 +1,6 @@ +/** + * Array of clusters. + */ +export type ListClustersReponse = { + topUsers?: string[]; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts new file mode 100644 index 00000000000..745625c4983 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts @@ -0,0 +1,8 @@ +import type { UserId } from './userId'; + +/** + * UserIDs data. + */ +export type ListUserIdsResponse = { + userIDs?: UserId[]; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/models.ts b/clients/algoliasearch-client-javascript/client-search/model/models.ts index 2fb37bde759..f302aec707f 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/models.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/models.ts @@ -1,6 +1,8 @@ /* eslint-disable no-param-reassign */ import type { RequestOptions } from '../utils/types'; +export * from './assignUserIdObject'; +export * from './assignUserIdResponse'; export * from './baseIndexSettings'; export * from './baseSearchParams'; export * from './baseSearchResponse'; @@ -9,11 +11,15 @@ export * from './batchObject'; export * from './batchResponse'; export * from './deleteIndexResponse'; export * from './errorBase'; +export * from './getTopUserIdsReponse'; export * from './highlightResult'; export * from './index'; export * from './indexSettings'; export * from './indexSettingsAsSearchParams'; +export * from './inlineResponse200'; +export * from './listClustersReponse'; export * from './listIndicesResponse'; +export * from './listUserIdsResponse'; export * from './multipleQueries'; export * from './multipleQueriesObject'; export * from './multipleQueriesResponse'; @@ -23,13 +29,16 @@ export * from './operationIndexResponse'; export * from './rankingInfo'; export * from './rankingInfoMatchedGeoLocation'; export * from './record'; +export * from './removeUserIdResponse'; export * from './saveObjectResponse'; export * from './searchHits'; export * from './searchParams'; export * from './searchParamsAsString'; export * from './searchResponse'; +export * from './searchUserIdsObject'; export * from './setSettingsResponse'; export * from './snippetResult'; +export * from './userId'; export interface Authentication { /** diff --git a/clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts new file mode 100644 index 00000000000..29f60b79c0a --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts @@ -0,0 +1,6 @@ +export type RemoveUserIdResponse = { + /** + * Date of deletion (ISO-8601 format). + */ + deletedAt?: Date; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts new file mode 100644 index 00000000000..59ae67ceff6 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts @@ -0,0 +1,21 @@ +/** + * Search userID object. + */ +export type SearchUserIdsObject = { + /** + * Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. + */ + query: string; + /** + * Cluster name. + */ + clusterName?: string; + /** + * Page number (zero-based). + */ + page?: number; + /** + * Number of hits per page. + */ + hitsPerPage?: number; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/userId.ts b/clients/algoliasearch-client-javascript/client-search/model/userId.ts new file mode 100644 index 00000000000..f64ecb27e51 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/userId.ts @@ -0,0 +1,9 @@ +/** + * A userID. + */ +export type UserId = { + userID?: string; + clusterName?: string; + nbRecords?: number; + dataSize?: number; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts index 9484c7b09e9..66d2db1283f 100644 --- a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts +++ b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts @@ -1,18 +1,27 @@ +import type { AssignUserIdObject } from '../model/assignUserIdObject'; +import type { AssignUserIdResponse } from '../model/assignUserIdResponse'; import type { BatchObject } from '../model/batchObject'; import type { BatchResponse } from '../model/batchResponse'; import type { DeleteIndexResponse } from '../model/deleteIndexResponse'; +import type { GetTopUserIdsReponse } from '../model/getTopUserIdsReponse'; import type { IndexSettings } from '../model/indexSettings'; +import type { InlineResponse200 } from '../model/inlineResponse200'; +import type { ListClustersReponse } from '../model/listClustersReponse'; import type { ListIndicesResponse } from '../model/listIndicesResponse'; +import type { ListUserIdsResponse } from '../model/listUserIdsResponse'; import { ApiKeyAuth } from '../model/models'; import type { MultipleQueriesObject } from '../model/multipleQueriesObject'; import type { MultipleQueriesResponse } from '../model/multipleQueriesResponse'; import type { OperationIndexObject } from '../model/operationIndexObject'; import type { OperationIndexResponse } from '../model/operationIndexResponse'; +import type { RemoveUserIdResponse } from '../model/removeUserIdResponse'; import type { SaveObjectResponse } from '../model/saveObjectResponse'; import type { SearchParams } from '../model/searchParams'; import type { SearchParamsAsString } from '../model/searchParamsAsString'; import type { SearchResponse } from '../model/searchResponse'; +import type { SearchUserIdsObject } from '../model/searchUserIdsObject'; import type { SetSettingsResponse } from '../model/setSettingsResponse'; +import type { UserId } from '../model/userId'; import { Transporter } from '../utils/Transporter'; import { shuffle } from '../utils/helpers'; import type { Requester } from '../utils/requester/Requester'; @@ -108,6 +117,50 @@ export class SearchApi { this.authentications[SearchApiKeys[key]].apiKey = value; } + /** + * Assign or Move a userID to a cluster. + * + * @summary Assign or Move a userID to a cluster. + * @param xAlgoliaUserID - UserID to assign. + * @param assignUserIdObject - The assignUserIdObject. + */ + assignUserId( + xAlgoliaUserID: Record, + assignUserIdObject: AssignUserIdObject + ): Promise { + const path = '/1/clusters/mapping'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + if (xAlgoliaUserID === null || xAlgoliaUserID === undefined) { + throw new Error( + 'Required parameter xAlgoliaUserID was null or undefined when calling assignUserId.' + ); + } + + if (assignUserIdObject === null || assignUserIdObject === undefined) { + throw new Error( + 'Required parameter assignUserIdObject was null or undefined when calling assignUserId.' + ); + } + + if (xAlgoliaUserID !== undefined) { + queryParameters['X-Algolia-User-ID'] = xAlgoliaUserID.toString(); + } + + const request: Request = { + method: 'POST', + path, + data: assignUserIdObject, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } /** * Performs multiple write operations in a single API call. * @@ -147,6 +200,50 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } + /** + * Assign multiple userIDs to a cluster. + * + * @summary Assign multiple userIDs to a cluster. + * @param xAlgoliaUserID - UserID to assign. + * @param assignUserIdObject - The assignUserIdObject. + */ + batchAssignUserIds( + xAlgoliaUserID: Record, + assignUserIdObject: AssignUserIdObject + ): Promise { + const path = '/1/clusters/mapping/batch'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + if (xAlgoliaUserID === null || xAlgoliaUserID === undefined) { + throw new Error( + 'Required parameter xAlgoliaUserID was null or undefined when calling batchAssignUserIds.' + ); + } + + if (assignUserIdObject === null || assignUserIdObject === undefined) { + throw new Error( + 'Required parameter assignUserIdObject was null or undefined when calling batchAssignUserIds.' + ); + } + + if (xAlgoliaUserID !== undefined) { + queryParameters['X-Algolia-User-ID'] = xAlgoliaUserID.toString(); + } + + const request: Request = { + method: 'POST', + path, + data: assignUserIdObject, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } /** * Delete an existing index. * @@ -210,6 +307,109 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } + /** + * Get the top 10 userIDs with the highest number of records per cluster. + * + * @summary Get the top 10 userIDs with the highest number of records per cluster. + */ + getTopUserIds(): Promise { + const path = '/1/clusters/mapping/top'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + const request: Request = { + method: 'GET', + path, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } + /** + * Returns the userID data stored in the mapping. + * + * @summary Returns the userID data stored in the mapping. + * @param userID - UserID to assign. + */ + getUserId(userID: Record): Promise { + const path = '/1/clusters/mapping/{userID}'.replace( + '{userID}', + encodeURIComponent(String(userID)) + ); + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + if (userID === null || userID === undefined) { + throw new Error( + 'Required parameter userID was null or undefined when calling getUserId.' + ); + } + + const request: Request = { + method: 'GET', + path, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } + /** + * Get the status of your clusters’ migrations or user creations. + * + * @summary Get the status of your clusters’ migrations or user creations. + * @param getClusters - The getClusters. + */ + hasPendingMappins(getClusters?: boolean): Promise { + const path = '/1/clusters/mapping/pending'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + if (getClusters !== undefined) { + queryParameters.getClusters = getClusters.toString(); + } + + const request: Request = { + method: 'GET', + path, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } + /** + * List the clusters available in a multi-clusters setup for a single appID. + * + * @summary List the clusters available in a multi-clusters setup for a single appID. + */ + listClusters(): Promise { + const path = '/1/clusters'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + const request: Request = { + method: 'GET', + path, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } /** * List existing indexes from an application. * @@ -237,6 +437,41 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } + /** + * List the userIDs assigned to a multi-clusters appID. + * + * @summary List the userIDs assigned to a multi-clusters appID. + * @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). + * @param hitsPerPage - Number of hits returned per page. + */ + listUserIds( + page?: number, + hitsPerPage?: number + ): Promise { + const path = '/1/clusters/mapping'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + if (page !== undefined) { + queryParameters.Page = page.toString(); + } + + if (hitsPerPage !== undefined) { + queryParameters.hitsPerPage = hitsPerPage.toString(); + } + + const request: Request = { + method: 'GET', + path, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } /** * Get search results for the given requests. * @@ -311,6 +546,41 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } + /** + * Remove a userID and its associated data from the multi-clusters. + * + * @summary Remove a userID and its associated data from the multi-clusters. + * @param xAlgoliaUserID - UserID to assign. + */ + removeUserId( + xAlgoliaUserID: Record + ): Promise { + const path = '/1/clusters/mapping'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + if (xAlgoliaUserID === null || xAlgoliaUserID === undefined) { + throw new Error( + 'Required parameter xAlgoliaUserID was null or undefined when calling removeUserId.' + ); + } + + if (xAlgoliaUserID !== undefined) { + queryParameters['X-Algolia-User-ID'] = xAlgoliaUserID.toString(); + } + + const request: Request = { + method: 'DELETE', + path, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } /** * Add an object to the index, automatically assigning it an object ID. * @@ -398,6 +668,38 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } + /** + * Search for userIDs. + * + * @summary Search for userIDs. + * @param searchUserIdsObject - The searchUserIdsObject. + */ + searchUserIds( + searchUserIdsObject: SearchUserIdsObject + ): Promise { + const path = '/1/clusters/mapping/search'; + const headers: Headers = { Accept: 'application/json' }; + const queryParameters: Record = {}; + + if (searchUserIdsObject === null || searchUserIdsObject === undefined) { + throw new Error( + 'Required parameter searchUserIdsObject was null or undefined when calling searchUserIds.' + ); + } + + const request: Request = { + method: 'POST', + path, + data: searchUserIdsObject, + }; + + const requestOptions: RequestOptions = { + headers, + queryParameters, + }; + + return this.sendRequest(request, requestOptions); + } /** * 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. * diff --git a/specs/common/parameters.yml b/specs/common/parameters.yml index 0557766ff2d..0ca14546a6b 100644 --- a/specs/common/parameters.yml +++ b/specs/common/parameters.yml @@ -26,6 +26,13 @@ Page: nullable: true default: null +HitsPerPage: + in: query + name: hitsPerPage + description: Number of hits returned per page. + schema: + type: integer + # misc taskID: type: integer diff --git a/specs/search/common/parameters.yml b/specs/search/common/parameters.yml index 68899657547..7c2b1c65329 100644 --- a/specs/search/common/parameters.yml +++ b/specs/search/common/parameters.yml @@ -1,28 +1,30 @@ -userID: +# query +HitsPerPage: + name: hitsPerPage + in: query + schema: + type: integer + description: Number of hits per page. + default: 20 + +UserIDInQuery: name: X-Algolia-User-ID description: userID to assign. in: query required: true schema: - type: string - pattern: '^[a-zA-Z0-9 \-\*\.]+$' + $ref: '#/userID' -users: - name: users +# path +UserIDInPath: + name: userID + description: userID to assign. + in: path required: true schema: - type: array - items: - type: string + $ref: '#/userID' -page: - name: page - in: query - schema: - $ref: './schemas/SearchParams.yml#/baseSearchParams/properties/page' - -hitsPerPage: - name: hitsPerPage - in: query - schema: - $ref: './schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' +# misc +userID: + type: string + pattern: '^[a-zA-Z0-9 \-\*\.]+$' diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 9872ec85a7c..7af7a4c1c70 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -3,8 +3,9 @@ post: - search operationId: batchAssignUserIds summary: Assign multiple userIDs to a cluster. + description: Assign multiple userIDs to a cluster. parameters: - - $ref: '../../common/parameters.yml#/userID' + - $ref: '../../common/parameters.yml#/UserIDInQuery' requestBody: required: true content: diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index ef89a23db60..b7a23b08a90 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -3,6 +3,7 @@ get: - search operationId: getTopUserIds summary: Get the top 10 userIDs with the highest number of records per cluster. + description: Get the top 10 userIDs with the highest number of records per cluster. responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/getUserId.yml b/specs/search/paths/multiclusters/getUserId.yml index 2474ffadc22..217a4906cfa 100644 --- a/specs/search/paths/multiclusters/getUserId.yml +++ b/specs/search/paths/multiclusters/getUserId.yml @@ -3,6 +3,7 @@ get: - search operationId: getUserId summary: Returns the userID data stored in the mapping. + description: Returns the userID data stored in the mapping. responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 29557d0ea18..fa87512a5dd 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -3,6 +3,7 @@ get: - search operationId: hasPendingMappins summary: Get the status of your clusters’ migrations or user creations. + description: Get the status of your clusters’ migrations or user creations. parameters: - in: query name: getClusters diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 247d0d8a66a..d21175ce10f 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -3,6 +3,7 @@ get: - search operationId: listClusters summary: List the clusters available in a multi-clusters setup for a single appID. + description: List the clusters available in a multi-clusters setup for a single appID. responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml index f16bccf1621..34412e6ad59 100644 --- a/specs/search/paths/multiclusters/schemas.yml +++ b/specs/search/paths/multiclusters/schemas.yml @@ -1,3 +1,13 @@ +page: + type: integer + description: Page number (zero-based). + default: 0 + +hitsPerPage: + type: integer + description: Number of hits per page. + default: 20 + nbHits: type: integer description: Number of hits that the search query matched. @@ -68,9 +78,9 @@ searchUserIdsObject: clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' page: - $ref: '../../common/schemas/SearchParams.yml#/baseSearchParams/properties/page' + $ref: '#/page' hitsPerPage: - $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' + $ref: '#/hitsPerPage' required: - query @@ -131,8 +141,8 @@ searchUserIdsReponse: nbHits: $ref: '#/nbHits' page: - $ref: '../../common/schemas/SearchParams.yml#/baseSearchParams/properties/page' + $ref: '#/page' hitsPerPage: - $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' + $ref: '#/hitsPerPage' updatedAt: $ref: '../../../common/parameters.yml#/updatedAt' diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 40dc9d0f9ef..69a1d3566ee 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -3,6 +3,7 @@ post: - search operationId: searchUserIds summary: Search for userIDs. + description: Search for userIDs. requestBody: required: true content: diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 2474ffadc22..ac3a5ce5669 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -3,6 +3,9 @@ get: - search operationId: getUserId summary: Returns the userID data stored in the mapping. + description: Returns the userID data stored in the mapping. + parameters: + - $ref: '../../common/parameters.yml#/UserIDInPath' responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 3bd881d5253..8f8ea10c8fb 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -3,8 +3,9 @@ post: - search operationId: assignUserId summary: Assign or Move a userID to a cluster. + description: Assign or Move a userID to a cluster. parameters: - - $ref: '../../common/parameters.yml#/userID' + - $ref: '../../common/parameters.yml#/UserIDInQuery' requestBody: required: true content: @@ -37,9 +38,10 @@ get: - search operationId: listUserIds summary: List the userIDs assigned to a multi-clusters appID. + description: List the userIDs assigned to a multi-clusters appID. parameters: - - $ref: '../../common/parameters.yml#/page' - - $ref: '../../common/parameters.yml#/hitsPerPage' + - $ref: '../../../common/parameters.yml#/Page' + - $ref: '../../../common/parameters.yml#/HitsPerPage' responses: '200': description: OK @@ -61,8 +63,9 @@ delete: - search operationId: removeUserId summary: Remove a userID and its associated data from the multi-clusters. + description: Remove a userID and its associated data from the multi-clusters. parameters: - - $ref: '../../common/parameters.yml#/userID' + - $ref: '../../common/parameters.yml#/UserIDInQuery' responses: '200': description: A task is created to remove the userID data and mapping From 1f73610f1f13c3b025a6f59438c71cb0be4b9c8f Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 10:11:32 +0100 Subject: [PATCH 07/28] Update specs/search/paths/multiclusters/userIds.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com> --- specs/search/paths/multiclusters/userIds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 8f8ea10c8fb..2d05ecbe301 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -68,7 +68,7 @@ delete: - $ref: '../../common/parameters.yml#/UserIDInQuery' responses: '200': - description: A task is created to remove the userID data and mapping + description: A task is created to remove the userID data and mapping. content: application/json: schema: From bebbb4cb58537fe7d41a12f6d6d1431ed0cceb6a Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 10:23:16 +0100 Subject: [PATCH 08/28] Update specs/search/paths/multiclusters/schemas.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com> --- specs/search/paths/multiclusters/schemas.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml index 34412e6ad59..76bdcfb5da4 100644 --- a/specs/search/paths/multiclusters/schemas.yml +++ b/specs/search/paths/multiclusters/schemas.yml @@ -100,9 +100,9 @@ searchUserIdsReponse: clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' nbRecords: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.nbRecords' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/nbRecords' dataSize: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.dataSize' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/dataSize' objectID: type: string example: 'user9' From 5195a8580dd2d2753759e5e53bfaf2ef3ffb7a15 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 10:24:11 +0100 Subject: [PATCH 09/28] feat: inline schemas --- .../multiclusters/batchAssignUserIds.yml | 11 +- .../paths/multiclusters/getTopUserIds.yml | 12 +- .../paths/multiclusters/listClusters.yml | 8 +- specs/search/paths/multiclusters/schemas.yml | 134 ------------------ .../paths/multiclusters/searchUserIds.yml | 79 ++++++++++- specs/search/paths/multiclusters/userId.yml | 2 +- specs/search/paths/multiclusters/userIds.yml | 15 +- 7 files changed, 116 insertions(+), 145 deletions(-) diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 7af7a4c1c70..d9874e5c254 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -11,7 +11,16 @@ post: content: application/json: schema: - $ref: './schemas.yml#/assignUserIdObject' + type: object + description: Assign userID object. + additionalProperties: false + properties: + cluster: + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' + users: + type: array + items: + type: string responses: '200': description: The operation has been taken into account, and the userIDs are directly usable. diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index b7a23b08a90..ebd7e4f3897 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -10,7 +10,17 @@ get: content: application/json: schema: - $ref: './schemas.yml#/getTopUserIdsReponse' + type: object + description: Array of userIDs and clusters. + properties: + topUsers: + type: array + items: + type: object + additionalProperties: + type: array + items: + $ref: '../../common/schemas/UserId.yml#/userId' '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index d21175ce10f..17cf7541af8 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -10,7 +10,13 @@ get: content: application/json: schema: - $ref: './schemas.yml#/listClustersReponse' + type: object + description: Array of clusters. + properties: + topUsers: + type: array + items: + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml index 34412e6ad59..2045ca3820d 100644 --- a/specs/search/paths/multiclusters/schemas.yml +++ b/specs/search/paths/multiclusters/schemas.yml @@ -12,137 +12,3 @@ nbHits: type: integer description: Number of hits that the search query matched. example: 20 - -assignUserIdObject: - type: object - description: Assign userID object. - additionalProperties: false - properties: - cluster: - $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' - -listUserIdsResponse: - type: object - description: UserIDs data. - properties: - userIDs: - type: array - items: - $ref: '../../common/schemas/UserId.yml#/userId' - -batchAssignUserIdsObject: - type: object - description: Assign userID object. - additionalProperties: false - properties: - cluster: - $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' - users: - type: array - items: - type: string - -getTopUserIdsReponse: - type: object - description: Array of userIDs and clusters. - properties: - topUsers: - type: array - items: - type: object - additionalProperties: - type: array - items: - $ref: '../../common/schemas/UserId.yml#/userId' - -getUserIdReponse: - $ref: '../../common/schemas/UserId.yml#/userId' - -listClustersReponse: - type: object - description: Array of clusters. - properties: - topUsers: - type: array - items: - $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' - -searchUserIdsObject: - type: object - description: Search userID object. - additionalProperties: false - properties: - query: - type: string - description: Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. - clusterName: - $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' - page: - $ref: '#/page' - hitsPerPage: - $ref: '#/hitsPerPage' - required: - - query - -searchUserIdsReponse: - type: object - description: userIDs data. - properties: - hits: - type: array - description: List of user object matching the query. - items: - type: object - properties: - userID: - type: string - example: 'user9' - clusterName: - $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' - nbRecords: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.nbRecords' - dataSize: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.dataSize' - objectID: - type: string - example: 'user9' - '_highlightResult': - type: object - properties: - userID: - type: object - properties: - value: - type: string - example: 'user<\/b>9' - matchLevel: - type: string - example: 'full' - fullyHightlited: - type: boolean - example: false - matchedWords: - type: array - items: - type: string - clusterName: - type: object - properties: - value: - type: string - example: 'c11-test' - matchLevel: - type: string - example: 'none' - matchedWords: - type: array - items: - type: string - nbHits: - $ref: '#/nbHits' - page: - $ref: '#/page' - hitsPerPage: - $ref: '#/hitsPerPage' - updatedAt: - $ref: '../../../common/parameters.yml#/updatedAt' diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 69a1d3566ee..e9ba3c07b46 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -9,19 +9,88 @@ post: content: application/json: schema: - $ref: './schemas.yml#/searchUserIdsObject' + type: object + description: Search userID object. + additionalProperties: false + properties: + query: + type: string + description: Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. + clusterName: + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' + page: + $ref: './schemas.yml#/page' + hitsPerPage: + $ref: './schemas.yml#/hitsPerPage' + required: + - query responses: '200': description: OK content: application/json: schema: - title: assignUserIdResponse type: object - additionalProperties: false + description: userIDs data. properties: - createdAt: - $ref: '../../../common/parameters.yml#/createdAt' + hits: + type: array + description: List of user object matching the query. + items: + type: object + properties: + userID: + type: string + example: 'user9' + clusterName: + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' + nbRecords: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.nbRecords' + dataSize: + $ref: '../../common/schemas/Cluster.yml#/cluster.properties.dataSize' + objectID: + type: string + example: 'user9' + '_highlightResult': + type: object + properties: + userID: + type: object + properties: + value: + type: string + example: 'user<\/b>9' + matchLevel: + type: string + example: 'full' + fullyHightlited: + type: boolean + example: false + matchedWords: + type: array + items: + type: string + clusterName: + type: object + properties: + value: + type: string + example: 'c11-test' + matchLevel: + type: string + example: 'none' + matchedWords: + type: array + items: + type: string + nbHits: + $ref: './schemas.yml#/nbHits' + page: + $ref: './schemas.yml#/page' + hitsPerPage: + $ref: './schemas.yml#/hitsPerPage' + updatedAt: + $ref: '../../../common/parameters.yml#/updatedAt' '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index ac3a5ce5669..320425215f7 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -12,7 +12,7 @@ get: content: application/json: schema: - $ref: './schemas.yml#/getUserIdReponse' + $ref: '../../common/schemas/UserId.yml#/userId' '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 8f8ea10c8fb..10b6afc1b01 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -11,7 +11,12 @@ post: content: application/json: schema: - $ref: './schemas.yml#/assignUserIdObject' + type: object + description: Assign userID object. + additionalProperties: false + properties: + cluster: + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' responses: '200': description: The operation has been taken into account, and the userID is directly usable. @@ -48,7 +53,13 @@ get: content: application/json: schema: - $ref: './schemas.yml#/listUserIdsResponse' + type: object + description: UserIDs data. + properties: + userIDs: + type: array + items: + $ref: '../../common/schemas/UserId.yml#/userId' '400': $ref: '../../../common/responses/BadRequest.yml' '402': From 691b6d8b89c753a42fc569678eedf3f1b8e72248 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 10:30:28 +0100 Subject: [PATCH 10/28] feat: reference HightlightResult --- .../paths/multiclusters/searchUserIds.yml | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index e9ba3c07b46..0f858731e36 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -51,38 +51,13 @@ post: objectID: type: string example: 'user9' - '_highlightResult': + _highlightResult: type: object properties: userID: - type: object - properties: - value: - type: string - example: 'user<\/b>9' - matchLevel: - type: string - example: 'full' - fullyHightlited: - type: boolean - example: false - matchedWords: - type: array - items: - type: string + $ref: '../../common/schemas/Record.yml#/highlightResult' clusterName: - type: object - properties: - value: - type: string - example: 'c11-test' - matchLevel: - type: string - example: 'none' - matchedWords: - type: array - items: - type: string + $ref: '../../common/schemas/Record.yml#/highlightResult' nbHits: $ref: './schemas.yml#/nbHits' page: From 0b622cb32e8981caf22203aa5dac40d6d7e382a3 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 10:47:40 +0100 Subject: [PATCH 11/28] feat: revamp summaries and descriptions --- .../multiclusters/batchAssignUserIds.yml | 11 +++++-- .../paths/multiclusters/getTopUserIds.yml | 9 ++++-- .../search/paths/multiclusters/getUserId.yml | 21 ------------- .../multiclusters/hasPendingMappings.yml | 13 ++++++-- .../paths/multiclusters/listClusters.yml | 7 +++-- .../paths/multiclusters/searchUserIds.yml | 13 ++++++-- specs/search/paths/multiclusters/userId.yml | 9 ++++-- specs/search/paths/multiclusters/userIds.yml | 31 ++++++++++++++----- 8 files changed, 70 insertions(+), 44 deletions(-) delete mode 100644 specs/search/paths/multiclusters/getUserId.yml diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index d9874e5c254..d692672f369 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -2,8 +2,13 @@ post: tags: - search operationId: batchAssignUserIds - summary: Assign multiple userIDs to a cluster. - description: Assign multiple userIDs to a cluster. + summary: Batch assign userIDs + description: > + 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. parameters: - $ref: '../../common/parameters.yml#/UserIDInQuery' requestBody: @@ -23,7 +28,7 @@ post: type: string responses: '200': - description: The operation has been taken into account, and the userIDs are directly usable. + description: OK content: application/json: schema: diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index ebd7e4f3897..6046446020d 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -2,8 +2,13 @@ get: tags: - search operationId: getTopUserIds - summary: Get the top 10 userIDs with the highest number of records per cluster. - description: Get the top 10 userIDs with the highest number of records per cluster. + summary: Get top userID + description: > + 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. responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/getUserId.yml b/specs/search/paths/multiclusters/getUserId.yml deleted file mode 100644 index 217a4906cfa..00000000000 --- a/specs/search/paths/multiclusters/getUserId.yml +++ /dev/null @@ -1,21 +0,0 @@ -get: - tags: - - search - operationId: getUserId - summary: Returns the userID data stored in the mapping. - description: Returns the userID data stored in the mapping. - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: './schemas.yml#/getUserIdReponse' - '400': - $ref: '../../../common/responses/BadRequest.yml' - '402': - $ref: '../../../common/responses/FeatureNotEnabled.yml' - '403': - $ref: '../../../common/responses/MethodNotAllowed.yml' - '404': - $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index fa87512a5dd..cce57ddb13a 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -2,8 +2,15 @@ get: tags: - search operationId: hasPendingMappins - summary: Get the status of your clusters’ migrations or user creations. - description: Get the status of your clusters’ migrations or user creations. + summary: Has pending mappings + description: > + 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. parameters: - in: query name: getClusters @@ -11,7 +18,7 @@ get: type: boolean responses: '200': - description: The operation has been taken into account, and the userIDs are directly usable. + description: OK content: application/json: schema: diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 17cf7541af8..a20e6bc9045 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -2,8 +2,11 @@ get: tags: - search operationId: listClusters - summary: List the clusters available in a multi-clusters setup for a single appID. - description: List the clusters available in a multi-clusters setup for a single appID. + summary: List clusters + description: > + 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. responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 0f858731e36..dec9d67cfe7 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -2,15 +2,22 @@ post: tags: - search operationId: searchUserIds - summary: Search for userIDs. - description: Search for userIDs. + summary: Search userID + description: > + 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. requestBody: required: true content: application/json: schema: type: object - description: Search userID object. + description: OK additionalProperties: false properties: query: diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 320425215f7..f305c9a5e84 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -2,8 +2,13 @@ get: tags: - search operationId: getUserId - summary: Returns the userID data stored in the mapping. - description: Returns the userID data stored in the mapping. + summary: Get userID + description: > + 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. parameters: - $ref: '../../common/parameters.yml#/UserIDInPath' responses: diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 10b6afc1b01..25a59aad169 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -2,8 +2,15 @@ post: tags: - search operationId: assignUserId - summary: Assign or Move a userID to a cluster. - description: Assign or Move a userID to a cluster. + summary: Assign or Move userID + description: > + 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. parameters: - $ref: '../../common/parameters.yml#/UserIDInQuery' requestBody: @@ -19,7 +26,7 @@ post: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' responses: '200': - description: The operation has been taken into account, and the userID is directly usable. + description: OK content: application/json: schema: @@ -42,8 +49,13 @@ get: tags: - search operationId: listUserIds - summary: List the userIDs assigned to a multi-clusters appID. - description: List the userIDs assigned to a multi-clusters appID. + summary: List userIDs + description: > + 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. parameters: - $ref: '../../../common/parameters.yml#/Page' - $ref: '../../../common/parameters.yml#/HitsPerPage' @@ -73,13 +85,16 @@ delete: tags: - search operationId: removeUserId - summary: Remove a userID and its associated data from the multi-clusters. - description: Remove a userID and its associated data from the multi-clusters. + summary: Remove userID + description: > + 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. parameters: - $ref: '../../common/parameters.yml#/UserIDInQuery' responses: '200': - description: A task is created to remove the userID data and mapping + description: OK content: application/json: schema: From c67788ac76c790256863a500b21226aea4648150 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 10:49:13 +0100 Subject: [PATCH 12/28] feat: move removeUserId from userIds.yml to userId.yml --- specs/search/paths/multiclusters/userId.yml | 32 ++++++++++++++++++++ specs/search/paths/multiclusters/userIds.yml | 32 -------------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index f305c9a5e84..d70c0b989ec 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -26,3 +26,35 @@ get: $ref: '../../../common/responses/MethodNotAllowed.yml' '404': $ref: '../../../common/responses/IndexNotFound.yml' + +delete: + tags: + - search + operationId: removeUserId + summary: Remove userID + description: > + 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. + parameters: + - $ref: '../../common/parameters.yml#/UserIDInQuery' + responses: + '200': + description: OK + content: + application/json: + schema: + title: removeUserIdResponse + type: object + additionalProperties: false + properties: + deletedAt: + $ref: '../../../common/parameters.yml#/deletedAt' + '400': + $ref: '../../../common/responses/BadRequest.yml' + '402': + $ref: '../../../common/responses/FeatureNotEnabled.yml' + '403': + $ref: '../../../common/responses/MethodNotAllowed.yml' + '404': + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 25a59aad169..dd440c6ac78 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -80,35 +80,3 @@ get: $ref: '../../../common/responses/MethodNotAllowed.yml' '404': $ref: '../../../common/responses/IndexNotFound.yml' - -delete: - tags: - - search - operationId: removeUserId - summary: Remove userID - description: > - 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. - parameters: - - $ref: '../../common/parameters.yml#/UserIDInQuery' - responses: - '200': - description: OK - content: - application/json: - schema: - title: removeUserIdResponse - type: object - additionalProperties: false - properties: - deletedAt: - $ref: '../../../common/parameters.yml#/deletedAt' - '400': - $ref: '../../../common/responses/BadRequest.yml' - '402': - $ref: '../../../common/responses/FeatureNotEnabled.yml' - '403': - $ref: '../../../common/responses/MethodNotAllowed.yml' - '404': - $ref: '../../../common/responses/IndexNotFound.yml' From 58d61fa07e253b8d975f1e870151966622bd2f3d Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 10:58:57 +0100 Subject: [PATCH 13/28] feat: reference common variables instead of creating duplicates in schemas.yml --- specs/search/paths/multiclusters/schemas.yml | 14 -------------- specs/search/paths/multiclusters/searchUserIds.yml | 10 +++++----- 2 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 specs/search/paths/multiclusters/schemas.yml diff --git a/specs/search/paths/multiclusters/schemas.yml b/specs/search/paths/multiclusters/schemas.yml deleted file mode 100644 index 2045ca3820d..00000000000 --- a/specs/search/paths/multiclusters/schemas.yml +++ /dev/null @@ -1,14 +0,0 @@ -page: - type: integer - description: Page number (zero-based). - default: 0 - -hitsPerPage: - type: integer - description: Number of hits per page. - default: 20 - -nbHits: - type: integer - description: Number of hits that the search query matched. - example: 20 diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index dec9d67cfe7..233b06e8ed5 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -26,9 +26,9 @@ post: clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' page: - $ref: './schemas.yml#/page' + $ref: '../../common/schemas/SearchParams.yml#/baseSearchParams/properties/page' hitsPerPage: - $ref: './schemas.yml#/hitsPerPage' + $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' required: - query responses: @@ -66,11 +66,11 @@ post: clusterName: $ref: '../../common/schemas/Record.yml#/highlightResult' nbHits: - $ref: './schemas.yml#/nbHits' + $ref: '../../common/schemas/SearchResponse.yml#/baseSearchResponse/properties/nbHits' page: - $ref: './schemas.yml#/page' + $ref: '../../common/schemas/SearchResponse.yml#/baseSearchResponse/properties/page' hitsPerPage: - $ref: './schemas.yml#/hitsPerPage' + $ref: '../../common/schemas/SearchResponse.yml#/baseSearchResponse/properties/hitsPerPage' updatedAt: $ref: '../../../common/parameters.yml#/updatedAt' '400': From aafad12bffdfc5dd7e5e638ccf30c04b10fcecd6 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 11:09:31 +0100 Subject: [PATCH 14/28] feat: generate client --- ...{assignUserIdObject.ts => inlineObject.ts} | 2 +- .../client-search/model/inlineObject1.ts | 10 ++ ...earchUserIdsObject.ts => inlineObject2.ts} | 8 +- .../client-search/model/inlineResponse200.ts | 10 +- ...serIdsReponse.ts => inlineResponse2001.ts} | 2 +- ...ustersReponse.ts => inlineResponse2002.ts} | 2 +- .../client-search/model/inlineResponse2003.ts | 27 ++++++ .../inlineResponse2003HighlightResult.ts | 6 ++ .../model/inlineResponse2003Hits.ts | 13 +++ .../client-search/model/inlineResponse2004.ts | 6 ++ .../model/listUserIdsResponse.ts | 8 -- .../client-search/model/models.ts | 14 ++- .../client-search/src/searchApi.ts | 93 +++++++++---------- .../paths/multiclusters/searchUserIds.yml | 4 +- 14 files changed, 131 insertions(+), 74 deletions(-) rename clients/algoliasearch-client-javascript/client-search/model/{assignUserIdObject.ts => inlineObject.ts} (71%) create mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts rename clients/algoliasearch-client-javascript/client-search/model/{searchUserIdsObject.ts => inlineObject2.ts} (68%) rename clients/algoliasearch-client-javascript/client-search/model/{getTopUserIdsReponse.ts => inlineResponse2001.ts} (78%) rename clients/algoliasearch-client-javascript/client-search/model/{listClustersReponse.ts => inlineResponse2002.ts} (60%) create mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003HighlightResult.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts delete mode 100644 clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts diff --git a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts similarity index 71% rename from clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts index 957cec4f80b..c8354b85001 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts @@ -1,7 +1,7 @@ /** * Assign userID object. */ -export type AssignUserIdObject = { +export type InlineObject = { /** * Cluster name. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts new file mode 100644 index 00000000000..cb4a342ccd9 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts @@ -0,0 +1,10 @@ +/** + * Assign userID object. + */ +export type InlineObject1 = { + /** + * Cluster name. + */ + cluster?: string; + users?: string[]; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts similarity index 68% rename from clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts index 59ae67ceff6..ec649e54826 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts @@ -1,7 +1,7 @@ /** - * Search userID object. + * OK. */ -export type SearchUserIdsObject = { +export type InlineObject2 = { /** * Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. */ @@ -11,11 +11,11 @@ export type SearchUserIdsObject = { */ clusterName?: string; /** - * Page number (zero-based). + * Specify the page to retrieve. */ page?: number; /** - * Number of hits per page. + * Set the number of hits per page. */ hitsPerPage?: number; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts index 1d4394a5136..24cb188b6b8 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts @@ -1,6 +1,8 @@ +import type { UserId } from './userId'; + +/** + * UserIDs data. + */ export type InlineResponse200 = { - /** - * Date of creation (ISO-8601 format). - */ - createdAt?: Date; + userIDs?: UserId[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsReponse.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts similarity index 78% rename from clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsReponse.ts rename to clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts index 68498b42270..4db846d5bce 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsReponse.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts @@ -3,6 +3,6 @@ import type { UserId } from './userId'; /** * Array of userIDs and clusters. */ -export type GetTopUserIdsReponse = { +export type InlineResponse2001 = { topUsers?: Array<{ [key: string]: UserId[] }>; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/listClustersReponse.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts similarity index 60% rename from clients/algoliasearch-client-javascript/client-search/model/listClustersReponse.ts rename to clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts index 708df461f4e..84c1fb3ad80 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/listClustersReponse.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts @@ -1,6 +1,6 @@ /** * Array of clusters. */ -export type ListClustersReponse = { +export type InlineResponse2002 = { topUsers?: string[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts new file mode 100644 index 00000000000..8b459ed79ac --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts @@ -0,0 +1,27 @@ +import type { InlineResponse2003Hits } from './inlineResponse2003Hits'; + +/** + * UserIDs data. + */ +export type InlineResponse2003 = { + /** + * List of user object matching the query. + */ + hits?: InlineResponse2003Hits[]; + /** + * Number of hits that the search query matched. + */ + nbHits?: number; + /** + * Specify the page to retrieve. + */ + page?: number; + /** + * Set the number of hits per page. + */ + hitsPerPage?: number; + /** + * Date of last update (ISO-8601 format). + */ + updatedAt?: Date; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003HighlightResult.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003HighlightResult.ts new file mode 100644 index 00000000000..c0d139707b6 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003HighlightResult.ts @@ -0,0 +1,6 @@ +import type { HighlightResult } from './highlightResult'; + +export type InlineResponse2003HighlightResult = { + userID?: HighlightResult; + clusterName?: HighlightResult; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts new file mode 100644 index 00000000000..65693c4cdd5 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts @@ -0,0 +1,13 @@ +import type { InlineResponse2003HighlightResult } from './inlineResponse2003HighlightResult'; + +export type InlineResponse2003Hits = { + userID?: string; + /** + * Cluster name. + */ + clusterName?: string; + nbRecords?: number; + dataSize?: number; + objectID?: string; + _highlightResult?: InlineResponse2003HighlightResult; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts new file mode 100644 index 00000000000..0c8fe429382 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts @@ -0,0 +1,6 @@ +export type InlineResponse2004 = { + /** + * Date of creation (ISO-8601 format). + */ + createdAt?: Date; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts deleted file mode 100644 index 745625c4983..00000000000 --- a/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { UserId } from './userId'; - -/** - * UserIDs data. - */ -export type ListUserIdsResponse = { - userIDs?: UserId[]; -}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/models.ts b/clients/algoliasearch-client-javascript/client-search/model/models.ts index f302aec707f..b69c1594e5a 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/models.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/models.ts @@ -1,7 +1,6 @@ /* eslint-disable no-param-reassign */ import type { RequestOptions } from '../utils/types'; -export * from './assignUserIdObject'; export * from './assignUserIdResponse'; export * from './baseIndexSettings'; export * from './baseSearchParams'; @@ -11,15 +10,21 @@ export * from './batchObject'; export * from './batchResponse'; export * from './deleteIndexResponse'; export * from './errorBase'; -export * from './getTopUserIdsReponse'; export * from './highlightResult'; export * from './index'; export * from './indexSettings'; export * from './indexSettingsAsSearchParams'; +export * from './inlineObject'; +export * from './inlineObject1'; +export * from './inlineObject2'; export * from './inlineResponse200'; -export * from './listClustersReponse'; +export * from './inlineResponse2001'; +export * from './inlineResponse2002'; +export * from './inlineResponse2003'; +export * from './inlineResponse2003HighlightResult'; +export * from './inlineResponse2003Hits'; +export * from './inlineResponse2004'; export * from './listIndicesResponse'; -export * from './listUserIdsResponse'; export * from './multipleQueries'; export * from './multipleQueriesObject'; export * from './multipleQueriesResponse'; @@ -35,7 +40,6 @@ export * from './searchHits'; export * from './searchParams'; export * from './searchParamsAsString'; export * from './searchResponse'; -export * from './searchUserIdsObject'; export * from './setSettingsResponse'; export * from './snippetResult'; export * from './userId'; diff --git a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts index 66d2db1283f..4a016d70d0d 100644 --- a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts +++ b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts @@ -1,14 +1,17 @@ -import type { AssignUserIdObject } from '../model/assignUserIdObject'; import type { AssignUserIdResponse } from '../model/assignUserIdResponse'; import type { BatchObject } from '../model/batchObject'; import type { BatchResponse } from '../model/batchResponse'; import type { DeleteIndexResponse } from '../model/deleteIndexResponse'; -import type { GetTopUserIdsReponse } from '../model/getTopUserIdsReponse'; import type { IndexSettings } from '../model/indexSettings'; +import type { InlineObject } from '../model/inlineObject'; +import type { InlineObject1 } from '../model/inlineObject1'; +import type { InlineObject2 } from '../model/inlineObject2'; import type { InlineResponse200 } from '../model/inlineResponse200'; -import type { ListClustersReponse } from '../model/listClustersReponse'; +import type { InlineResponse2001 } from '../model/inlineResponse2001'; +import type { InlineResponse2002 } from '../model/inlineResponse2002'; +import type { InlineResponse2003 } from '../model/inlineResponse2003'; +import type { InlineResponse2004 } from '../model/inlineResponse2004'; import type { ListIndicesResponse } from '../model/listIndicesResponse'; -import type { ListUserIdsResponse } from '../model/listUserIdsResponse'; import { ApiKeyAuth } from '../model/models'; import type { MultipleQueriesObject } from '../model/multipleQueriesObject'; import type { MultipleQueriesResponse } from '../model/multipleQueriesResponse'; @@ -19,7 +22,6 @@ import type { SaveObjectResponse } from '../model/saveObjectResponse'; import type { SearchParams } from '../model/searchParams'; import type { SearchParamsAsString } from '../model/searchParamsAsString'; import type { SearchResponse } from '../model/searchResponse'; -import type { SearchUserIdsObject } from '../model/searchUserIdsObject'; import type { SetSettingsResponse } from '../model/setSettingsResponse'; import type { UserId } from '../model/userId'; import { Transporter } from '../utils/Transporter'; @@ -118,15 +120,15 @@ export class SearchApi { } /** - * Assign or Move a userID to a cluster. + * 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. * - * @summary Assign or Move a userID to a cluster. + * @summary Assign or Move userID. * @param xAlgoliaUserID - UserID to assign. - * @param assignUserIdObject - The assignUserIdObject. + * @param inlineObject - The inlineObject. */ assignUserId( xAlgoliaUserID: Record, - assignUserIdObject: AssignUserIdObject + inlineObject: InlineObject ): Promise { const path = '/1/clusters/mapping'; const headers: Headers = { Accept: 'application/json' }; @@ -138,9 +140,9 @@ export class SearchApi { ); } - if (assignUserIdObject === null || assignUserIdObject === undefined) { + if (inlineObject === null || inlineObject === undefined) { throw new Error( - 'Required parameter assignUserIdObject was null or undefined when calling assignUserId.' + 'Required parameter inlineObject was null or undefined when calling assignUserId.' ); } @@ -151,7 +153,7 @@ export class SearchApi { const request: Request = { method: 'POST', path, - data: assignUserIdObject, + data: inlineObject, }; const requestOptions: RequestOptions = { @@ -201,15 +203,15 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * Assign multiple userIDs to a cluster. + * 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. * - * @summary Assign multiple userIDs to a cluster. + * @summary Batch assign userIDs. * @param xAlgoliaUserID - UserID to assign. - * @param assignUserIdObject - The assignUserIdObject. + * @param inlineObject1 - The inlineObject1. */ batchAssignUserIds( xAlgoliaUserID: Record, - assignUserIdObject: AssignUserIdObject + inlineObject1: InlineObject1 ): Promise { const path = '/1/clusters/mapping/batch'; const headers: Headers = { Accept: 'application/json' }; @@ -221,9 +223,9 @@ export class SearchApi { ); } - if (assignUserIdObject === null || assignUserIdObject === undefined) { + if (inlineObject1 === null || inlineObject1 === undefined) { throw new Error( - 'Required parameter assignUserIdObject was null or undefined when calling batchAssignUserIds.' + 'Required parameter inlineObject1 was null or undefined when calling batchAssignUserIds.' ); } @@ -234,7 +236,7 @@ export class SearchApi { const request: Request = { method: 'POST', path, - data: assignUserIdObject, + data: inlineObject1, }; const requestOptions: RequestOptions = { @@ -308,11 +310,11 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * Get the top 10 userIDs with the highest number of records per cluster. + * 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. * - * @summary Get the top 10 userIDs with the highest number of records per cluster. + * @summary Get top userID. */ - getTopUserIds(): Promise { + getTopUserIds(): Promise { const path = '/1/clusters/mapping/top'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -330,9 +332,9 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * Returns the userID data stored in the mapping. + * 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. * - * @summary Returns the userID data stored in the mapping. + * @summary Get userID. * @param userID - UserID to assign. */ getUserId(userID: Record): Promise { @@ -362,12 +364,12 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * Get the status of your clusters’ migrations or user creations. + * 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. * - * @summary Get the status of your clusters’ migrations or user creations. + * @summary Has pending mappings. * @param getClusters - The getClusters. */ - hasPendingMappins(getClusters?: boolean): Promise { + hasPendingMappins(getClusters?: boolean): Promise { const path = '/1/clusters/mapping/pending'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -389,11 +391,11 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * List the clusters available in a multi-clusters setup for a single appID. + * 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. * - * @summary List the clusters available in a multi-clusters setup for a single appID. + * @summary List clusters. */ - listClusters(): Promise { + listClusters(): Promise { const path = '/1/clusters'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -438,16 +440,13 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * List the userIDs assigned to a multi-clusters appID. + * 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. * - * @summary List the userIDs assigned to a multi-clusters appID. + * @summary List userIDs. * @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). * @param hitsPerPage - Number of hits returned per page. */ - listUserIds( - page?: number, - hitsPerPage?: number - ): Promise { + listUserIds(page?: number, hitsPerPage?: number): Promise { const path = '/1/clusters/mapping'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -547,15 +546,15 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * Remove a userID and its associated data from the multi-clusters. + * 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. * - * @summary Remove a userID and its associated data from the multi-clusters. + * @summary Remove userID. * @param xAlgoliaUserID - UserID to assign. */ removeUserId( xAlgoliaUserID: Record ): Promise { - const path = '/1/clusters/mapping'; + const path = '/1/clusters/mapping/{userID}'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -669,28 +668,26 @@ export class SearchApi { return this.sendRequest(request, requestOptions); } /** - * Search for userIDs. + * 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. * - * @summary Search for userIDs. - * @param searchUserIdsObject - The searchUserIdsObject. + * @summary Search userID. + * @param inlineObject2 - The inlineObject2. */ - searchUserIds( - searchUserIdsObject: SearchUserIdsObject - ): Promise { + searchUserIds(inlineObject2: InlineObject2): Promise { const path = '/1/clusters/mapping/search'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (searchUserIdsObject === null || searchUserIdsObject === undefined) { + if (inlineObject2 === null || inlineObject2 === undefined) { throw new Error( - 'Required parameter searchUserIdsObject was null or undefined when calling searchUserIds.' + 'Required parameter inlineObject2 was null or undefined when calling searchUserIds.' ); } const request: Request = { method: 'POST', path, - data: searchUserIdsObject, + data: inlineObject2, }; const requestOptions: RequestOptions = { diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 233b06e8ed5..7f4e41b6b3e 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -52,9 +52,9 @@ post: clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' nbRecords: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.nbRecords' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/nbRecords' dataSize: - $ref: '../../common/schemas/Cluster.yml#/cluster.properties.dataSize' + $ref: '../../common/schemas/Cluster.yml#/cluster/properties/dataSize' objectID: type: string example: 'user9' From bd14468f0c51b70dbd9ea398b312f4da2eb94323 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 11:30:19 +0100 Subject: [PATCH 15/28] fix: add userID parameter in path instead of query for deleteUser method --- .../client-search/src/searchApi.ts | 19 ++++++++----------- specs/search/paths/multiclusters/userId.yml | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts index ceafc942c51..f62c2100376 100644 --- a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts +++ b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts @@ -680,25 +680,22 @@ export class SearchApi { * 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. * * @summary Remove userID. - * @param xAlgoliaUserID - UserID to assign. + * @param userID - UserID to assign. */ - removeUserId( - xAlgoliaUserID: Record - ): Promise { - const path = '/1/clusters/mapping/{userID}'; + removeUserId(userID: Record): Promise { + const path = '/1/clusters/mapping/{userID}'.replace( + '{userID}', + encodeURIComponent(String(userID)) + ); const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (xAlgoliaUserID === null || xAlgoliaUserID === undefined) { + if (userID === null || userID === undefined) { throw new Error( - 'Required parameter xAlgoliaUserID was null or undefined when calling removeUserId.' + 'Required parameter userID was null or undefined when calling removeUserId.' ); } - if (xAlgoliaUserID !== undefined) { - queryParameters['X-Algolia-User-ID'] = xAlgoliaUserID.toString(); - } - const request: Request = { method: 'DELETE', path, diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index d70c0b989ec..3912643c5ef 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -37,7 +37,7 @@ delete: Upon success, the response is 200 OK and a task is created to remove the userID data and mapping. parameters: - - $ref: '../../common/parameters.yml#/UserIDInQuery' + - $ref: '../../common/parameters.yml#/UserIDInPath' responses: '200': description: OK From 1304370e76f93be543a33ed8416ea5113b5b61b0 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 11:41:23 +0100 Subject: [PATCH 16/28] feat: simplify userID regex --- specs/search/common/parameters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/search/common/parameters.yml b/specs/search/common/parameters.yml index 7c2b1c65329..adc46fea062 100644 --- a/specs/search/common/parameters.yml +++ b/specs/search/common/parameters.yml @@ -27,4 +27,4 @@ UserIDInPath: # misc userID: type: string - pattern: '^[a-zA-Z0-9 \-\*\.]+$' + pattern: '^[a-zA-Z0-9 \-*.]+$' From 4f1e1d39b89ed502dadaf82706d7a6354268574d Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 11:55:16 +0100 Subject: [PATCH 17/28] feat: add required response properties --- specs/search/common/schemas/Cluster.yml | 5 +++++ specs/search/common/schemas/UserId.yml | 5 +++++ specs/search/paths/multiclusters/batchAssignUserIds.yml | 2 ++ specs/search/paths/multiclusters/getTopUserIds.yml | 2 ++ specs/search/paths/multiclusters/hasPendingMappings.yml | 2 ++ specs/search/paths/multiclusters/listClusters.yml | 2 ++ specs/search/paths/multiclusters/searchUserIds.yml | 9 +++++++++ specs/search/paths/multiclusters/userId.yml | 2 ++ specs/search/paths/multiclusters/userIds.yml | 4 ++++ 9 files changed, 33 insertions(+) diff --git a/specs/search/common/schemas/Cluster.yml b/specs/search/common/schemas/Cluster.yml index 20d694eff10..2a4a80808fe 100644 --- a/specs/search/common/schemas/Cluster.yml +++ b/specs/search/common/schemas/Cluster.yml @@ -14,3 +14,8 @@ cluster: dataSize: type: integer example: 481 + required: + - clusterName + - nbRecords + - nbUserIDs + - dataSize diff --git a/specs/search/common/schemas/UserId.yml b/specs/search/common/schemas/UserId.yml index 905721ea1ec..b198843325a 100644 --- a/specs/search/common/schemas/UserId.yml +++ b/specs/search/common/schemas/UserId.yml @@ -14,3 +14,8 @@ userId: dataSize: type: integer example: 0 + required: + - userID + - clusterName + - nbRecords + - dataSize diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index d692672f369..77956314dfe 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -38,6 +38,8 @@ post: properties: createdAt: $ref: '../../../common/parameters.yml#/createdAt' + required: + - createdAt '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index 6046446020d..395e8cfa442 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -26,6 +26,8 @@ get: type: array items: $ref: '../../common/schemas/UserId.yml#/userId' + required: + - topUsers '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index cce57ddb13a..193e62e7013 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -27,6 +27,8 @@ get: properties: createdAt: $ref: '../../../common/parameters.yml#/createdAt' + required: + - createdAt '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index a20e6bc9045..99e4c8fbb4f 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -20,6 +20,8 @@ get: type: array items: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' + required: + - topUsers '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 7f4e41b6b3e..cc1af0e97de 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -31,6 +31,9 @@ post: $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' required: - query + - clusterName + - page + - hitsPerPage responses: '200': description: OK @@ -73,6 +76,12 @@ post: $ref: '../../common/schemas/SearchResponse.yml#/baseSearchResponse/properties/hitsPerPage' updatedAt: $ref: '../../../common/parameters.yml#/updatedAt' + required: + - hits + - nbHits + - page + - hitsPerPage + - updatedAt '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 3912643c5ef..0decb9d217d 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -50,6 +50,8 @@ delete: properties: deletedAt: $ref: '../../../common/parameters.yml#/deletedAt' + required: + - deletedAt '400': $ref: '../../../common/responses/BadRequest.yml' '402': diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index dd440c6ac78..c8a842603cb 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -36,6 +36,8 @@ post: properties: createdAt: $ref: '../../../common/parameters.yml#/createdAt' + required: + - createdAt '400': $ref: '../../../common/responses/BadRequest.yml' '402': @@ -72,6 +74,8 @@ get: type: array items: $ref: '../../common/schemas/UserId.yml#/userId' + required: + - userIDs '400': $ref: '../../../common/responses/BadRequest.yml' '402': From f8a823c6ba26632513690e21f1b736aef18a2a1b Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 12:00:01 +0100 Subject: [PATCH 18/28] feat: add required request properties --- specs/search/paths/multiclusters/batchAssignUserIds.yml | 3 +++ specs/search/paths/multiclusters/searchUserIds.yml | 3 --- specs/search/paths/multiclusters/userIds.yml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 77956314dfe..2b308bfe024 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -26,6 +26,9 @@ post: type: array items: type: string + required: + - cluster + - users responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index cc1af0e97de..91e1c7eb74d 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -31,9 +31,6 @@ post: $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/hitsPerPage' required: - query - - clusterName - - page - - hitsPerPage responses: '200': description: OK diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index c8a842603cb..8af8bce5e75 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -24,6 +24,8 @@ post: properties: cluster: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' + required: + - cluster responses: '200': description: OK From cbd1c92215f50cae063ae56f3b998c341a1bfcc5 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 12:00:49 +0100 Subject: [PATCH 19/28] feat: generate specs --- .../client-search/model/assignUserIdResponse.ts | 2 +- .../client-search/model/inlineObject.ts | 2 +- .../client-search/model/inlineObject1.ts | 4 ++-- .../client-search/model/inlineResponse200.ts | 2 +- .../client-search/model/inlineResponse2001.ts | 2 +- .../client-search/model/inlineResponse2002.ts | 2 +- .../client-search/model/inlineResponse2003.ts | 10 +++++----- .../client-search/model/inlineResponse2004.ts | 2 +- .../client-search/model/removeUserIdResponse.ts | 2 +- .../client-search/model/userId.ts | 8 ++++---- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts index ad7d6d1ee6c..9323e493963 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdResponse.ts @@ -2,5 +2,5 @@ export type AssignUserIdResponse = { /** * Date of creation (ISO-8601 format). */ - createdAt?: Date; + createdAt: Date; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts index c8354b85001..3619ff1f583 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts @@ -5,5 +5,5 @@ export type InlineObject = { /** * Cluster name. */ - cluster?: string; + cluster: string; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts index cb4a342ccd9..ae27d702f10 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts @@ -5,6 +5,6 @@ export type InlineObject1 = { /** * Cluster name. */ - cluster?: string; - users?: string[]; + cluster: string; + users: string[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts index 24cb188b6b8..7c6504ff0be 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts @@ -4,5 +4,5 @@ import type { UserId } from './userId'; * UserIDs data. */ export type InlineResponse200 = { - userIDs?: UserId[]; + userIDs: UserId[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts index 4db846d5bce..561e60fe040 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts @@ -4,5 +4,5 @@ import type { UserId } from './userId'; * Array of userIDs and clusters. */ export type InlineResponse2001 = { - topUsers?: Array<{ [key: string]: UserId[] }>; + topUsers: Array<{ [key: string]: UserId[] }>; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts index 84c1fb3ad80..b474be6736d 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts @@ -2,5 +2,5 @@ * Array of clusters. */ export type InlineResponse2002 = { - topUsers?: string[]; + topUsers: string[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts index 66fc923df8f..cae20286fd1 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts @@ -7,18 +7,18 @@ export type InlineResponse2003 = { /** * List of user object matching the query. */ - hits?: InlineResponse2003Hits[]; - nbHits?: Record; + hits: InlineResponse2003Hits[]; + nbHits: Record; /** * Specify the page to retrieve. */ - page?: number; + page: number; /** * Set the number of hits per page. */ - hitsPerPage?: number; + hitsPerPage: number; /** * Date of last update (ISO-8601 format). */ - updatedAt?: Date; + updatedAt: Date; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts index 0c8fe429382..4f4a290e7ae 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts @@ -2,5 +2,5 @@ export type InlineResponse2004 = { /** * Date of creation (ISO-8601 format). */ - createdAt?: Date; + createdAt: Date; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts index 29f60b79c0a..81ed3963d6e 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/removeUserIdResponse.ts @@ -2,5 +2,5 @@ export type RemoveUserIdResponse = { /** * Date of deletion (ISO-8601 format). */ - deletedAt?: Date; + deletedAt: Date; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/userId.ts b/clients/algoliasearch-client-javascript/client-search/model/userId.ts index f64ecb27e51..db05c4a47e4 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/userId.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/userId.ts @@ -2,8 +2,8 @@ * A userID. */ export type UserId = { - userID?: string; - clusterName?: string; - nbRecords?: number; - dataSize?: number; + userID: string; + clusterName: string; + nbRecords: number; + dataSize: number; }; From 5a7ea705af73676622856dea84411e40e57e1ac4 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 13:43:06 +0100 Subject: [PATCH 20/28] feat: add missing description on userIDs and topUsers --- .../client-search/model/inlineResponse200.ts | 3 +++ .../client-search/model/inlineResponse2001.ts | 3 +++ .../client-search/model/inlineResponse2002.ts | 3 +++ specs/search/paths/multiclusters/getTopUserIds.yml | 1 + specs/search/paths/multiclusters/listClusters.yml | 1 + specs/search/paths/multiclusters/userIds.yml | 1 + 6 files changed, 12 insertions(+) diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts index 7c6504ff0be..3a486708b42 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts @@ -4,5 +4,8 @@ import type { UserId } from './userId'; * UserIDs data. */ export type InlineResponse200 = { + /** + * List of userIDs. + */ userIDs: UserId[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts index 561e60fe040..2123001bf49 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts @@ -4,5 +4,8 @@ import type { UserId } from './userId'; * Array of userIDs and clusters. */ export type InlineResponse2001 = { + /** + * Mapping of cluster names to top users. + */ topUsers: Array<{ [key: string]: UserId[] }>; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts index b474be6736d..1fec69e7e4f 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts @@ -2,5 +2,8 @@ * Array of clusters. */ export type InlineResponse2002 = { + /** + * Mapping of cluster names to top users. + */ topUsers: string[]; }; diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index 395e8cfa442..b060dfd7444 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -20,6 +20,7 @@ get: properties: topUsers: type: array + description: Mapping of cluster names to top users. items: type: object additionalProperties: diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 99e4c8fbb4f..54da2c82ab7 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -18,6 +18,7 @@ get: properties: topUsers: type: array + description: Mapping of cluster names to top users. items: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' required: diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 8af8bce5e75..9a0e7877060 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -74,6 +74,7 @@ get: properties: userIDs: type: array + description: List of userIDs. items: $ref: '../../common/schemas/UserId.yml#/userId' required: From 2e12ed0c05d5c6b83aea14ff1ea84bf3b583452c Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 14:01:25 +0100 Subject: [PATCH 21/28] feat: add missing descriptions --- .../client-search/model/inlineObject.ts | 2 +- .../client-search/model/inlineObject1.ts | 5 ++++- .../client-search/model/inlineObject2.ts | 2 +- .../client-search/model/inlineResponse2003Hits.ts | 8 +++++++- .../client-search/model/userId.ts | 12 ++++++++++++ specs/search/common/schemas/Cluster.yml | 6 +++++- specs/search/common/schemas/SearchResponse.yml | 2 +- specs/search/common/schemas/UserId.yml | 4 ++++ .../paths/multiclusters/batchAssignUserIds.yml | 1 + 9 files changed, 36 insertions(+), 6 deletions(-) diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts index 3619ff1f583..613c4fa6559 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts @@ -3,7 +3,7 @@ */ export type InlineObject = { /** - * Cluster name. + * Name of the cluster. */ cluster: string; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts index ae27d702f10..7421b0943d6 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts @@ -3,8 +3,11 @@ */ export type InlineObject1 = { /** - * Cluster name. + * Name of the cluster. */ cluster: string; + /** + * UserIDs to assign. Note you cannot move users with this method. + */ users: string[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts index ec649e54826..0a075dd21b9 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts @@ -7,7 +7,7 @@ export type InlineObject2 = { */ query: string; /** - * Cluster name. + * Name of the cluster. */ clusterName?: string; /** diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts index 65693c4cdd5..1ca71687929 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts @@ -3,10 +3,16 @@ import type { InlineResponse2003HighlightResult } from './inlineResponse2003High export type InlineResponse2003Hits = { userID?: string; /** - * Cluster name. + * Name of the cluster. */ clusterName?: string; + /** + * Number of records in the cluster. + */ nbRecords?: number; + /** + * Data size taken by all the users assigned to the cluster. + */ dataSize?: number; objectID?: string; _highlightResult?: InlineResponse2003HighlightResult; diff --git a/clients/algoliasearch-client-javascript/client-search/model/userId.ts b/clients/algoliasearch-client-javascript/client-search/model/userId.ts index db05c4a47e4..a79a52f2bdd 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/userId.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/userId.ts @@ -2,8 +2,20 @@ * A userID. */ export type UserId = { + /** + * UserID of the user. + */ userID: string; + /** + * Cluster on which the user is assigned. + */ clusterName: string; + /** + * Number of records belonging to the user. + */ nbRecords: number; + /** + * Data size used by the user. + */ dataSize: number; }; diff --git a/specs/search/common/schemas/Cluster.yml b/specs/search/common/schemas/Cluster.yml index 2a4a80808fe..0b6dca28045 100644 --- a/specs/search/common/schemas/Cluster.yml +++ b/specs/search/common/schemas/Cluster.yml @@ -4,15 +4,19 @@ cluster: properties: clusterName: type: string - description: Cluster name. + description: Name of the cluster. example: 'c11-test' nbRecords: type: integer + description: Number of records in the cluster. example: 3 nbUserIDs: type: integer + description: Number of users assigned to the cluster. + example: 19 dataSize: type: integer + description: Data size taken by all the users assigned to the cluster. example: 481 required: - clusterName diff --git a/specs/search/common/schemas/SearchResponse.yml b/specs/search/common/schemas/SearchResponse.yml index c4d7756e62c..141c550947e 100644 --- a/specs/search/common/schemas/SearchResponse.yml +++ b/specs/search/common/schemas/SearchResponse.yml @@ -14,7 +14,7 @@ searchHits: nbHits: type: integer - description: Number of hits that the search query matched + description: Number of hits that the search query matched. example: 20 baseSearchResponse: diff --git a/specs/search/common/schemas/UserId.yml b/specs/search/common/schemas/UserId.yml index b198843325a..4e6058202ed 100644 --- a/specs/search/common/schemas/UserId.yml +++ b/specs/search/common/schemas/UserId.yml @@ -4,15 +4,19 @@ userId: properties: userID: type: string + description: userID of the user. example: 'user1' clusterName: type: string + description: Cluster on which the user is assigned. example: 'c1-test' nbRecords: type: integer + description: Number of records belonging to the user. example: 42 dataSize: type: integer + description: Data size used by the user. example: 0 required: - userID diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 2b308bfe024..23840a92a49 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -24,6 +24,7 @@ post: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' users: type: array + description: userIDs to assign. Note you cannot move users with this method. items: type: string required: From 2f80072a3a1e2ec81f42322df7bac2406f7ecd89 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 14:20:01 +0100 Subject: [PATCH 22/28] fix: fix typo in hasPendingMappins --- specs/search/common/parameters.yml | 1 + specs/search/paths/multiclusters/hasPendingMappings.yml | 2 +- specs/search/paths/multiclusters/searchUserIds.yml | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/search/common/parameters.yml b/specs/search/common/parameters.yml index adc46fea062..6b5b614570c 100644 --- a/specs/search/common/parameters.yml +++ b/specs/search/common/parameters.yml @@ -1,6 +1,7 @@ # query HitsPerPage: name: hitsPerPage + description: Number of users to retrieve per page. in: query schema: type: integer diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 193e62e7013..df841c93018 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -1,7 +1,7 @@ get: tags: - search - operationId: hasPendingMappins + operationId: hasPendingMappings summary: Has pending mappings description: > Get the status of your clusters’ migrations or user creations. diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 91e1c7eb74d..cf60cc56d3d 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -47,8 +47,7 @@ post: type: object properties: userID: - type: string - example: 'user9' + $ref: '../../commons/schemas/UserId.yml#/userId/properties/userID' clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' nbRecords: @@ -57,7 +56,7 @@ post: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/dataSize' objectID: type: string - example: 'user9' + description: userID of the requested user. Same as userID. _highlightResult: type: object properties: From 376f6b1379df97a0fcc2c383e062c84259235b7a Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 14:22:32 +0100 Subject: [PATCH 23/28] feat: add names to responses --- specs/search/paths/multiclusters/batchAssignUserIds.yml | 1 + specs/search/paths/multiclusters/getTopUserIds.yml | 1 + specs/search/paths/multiclusters/hasPendingMappings.yml | 1 + specs/search/paths/multiclusters/listClusters.yml | 1 + specs/search/paths/multiclusters/searchUserIds.yml | 1 + specs/search/paths/multiclusters/userId.yml | 2 ++ specs/search/paths/multiclusters/userIds.yml | 2 ++ 7 files changed, 9 insertions(+) diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 23840a92a49..bf914127446 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -32,6 +32,7 @@ post: - users responses: '200': + name: batchAssignUserIdsResponse description: OK content: application/json: diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index b060dfd7444..62dc6065d65 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -11,6 +11,7 @@ get: Upon success, the response is 200 OK and contains the following array of userIDs and clusters. responses: '200': + name: getTopUserIdsResponse description: OK content: application/json: diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index df841c93018..9ec08f5b193 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -18,6 +18,7 @@ get: type: boolean responses: '200': + name: hasPendingMappings description: OK content: application/json: diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 54da2c82ab7..9e623c33b3e 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -9,6 +9,7 @@ get: Upon success, the response is 200 OK and contains the following clusters. responses: '200': + name: listClustersResponse description: OK content: application/json: diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index cf60cc56d3d..0ce36db8185 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -33,6 +33,7 @@ post: - query responses: '200': + name: searchUserIdsResponse description: OK content: application/json: diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 0decb9d217d..f8d8bcd999e 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -13,6 +13,7 @@ get: - $ref: '../../common/parameters.yml#/UserIDInPath' responses: '200': + name: getUserIdResponse description: OK content: application/json: @@ -40,6 +41,7 @@ delete: - $ref: '../../common/parameters.yml#/UserIDInPath' responses: '200': + name: removeUserIdResponse description: OK content: application/json: diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 9a0e7877060..c08b00df25c 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -28,6 +28,7 @@ post: - cluster responses: '200': + name: assignUserIdResponse description: OK content: application/json: @@ -65,6 +66,7 @@ get: - $ref: '../../../common/parameters.yml#/HitsPerPage' responses: '200': + name: listUserIdsResponse description: OK content: application/json: From 33287f32336d4125e383ab11b0ee1375c206f343 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 15:04:29 +0100 Subject: [PATCH 24/28] feat: add small fixes, add object titles, generate client --- .../client-search/model/assignUserIdObject.ts | 9 +++ .../model/batchAssignUserIdsObject.ts | 13 ++++ ...e2004.ts => batchAssignUserIdsResponse.ts} | 2 +- ...sponse2001.ts => getTopUserIdsResponse.ts} | 2 +- .../model/hasPendingMappingsResponse.ts | 6 ++ .../model/inlineResponse2003Hits.ts | 19 ------ ...esponse2002.ts => listClustersResponse.ts} | 2 +- ...eResponse200.ts => listUserIdsResponse.ts} | 2 +- .../client-search/model/models.ts | 21 +++--- .../model/searchUserIdsObject.ts | 21 ++++++ ...sponse2003.ts => searchUserIdsResponse.ts} | 6 +- ...> searchUserIdsResponseHighlightResult.ts} | 2 +- .../model/searchUserIdsResponseHits.ts | 23 +++++++ .../client-search/src/searchApi.ts | 67 +++++++++++-------- specs/search/common/schemas/UserId.yml | 1 + .../multiclusters/batchAssignUserIds.yml | 4 +- .../paths/multiclusters/getTopUserIds.yml | 2 +- .../multiclusters/hasPendingMappings.yml | 2 +- .../paths/multiclusters/listClusters.yml | 2 +- .../paths/multiclusters/searchUserIds.yml | 5 +- specs/search/paths/multiclusters/userId.yml | 2 - specs/search/paths/multiclusters/userIds.yml | 4 +- 22 files changed, 141 insertions(+), 76 deletions(-) create mode 100644 clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts create mode 100644 clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsObject.ts rename clients/algoliasearch-client-javascript/client-search/model/{inlineResponse2004.ts => batchAssignUserIdsResponse.ts} (63%) rename clients/algoliasearch-client-javascript/client-search/model/{inlineResponse2001.ts => getTopUserIdsResponse.ts} (83%) create mode 100644 clients/algoliasearch-client-javascript/client-search/model/hasPendingMappingsResponse.ts delete mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts rename clients/algoliasearch-client-javascript/client-search/model/{inlineResponse2002.ts => listClustersResponse.ts} (75%) rename clients/algoliasearch-client-javascript/client-search/model/{inlineResponse200.ts => listUserIdsResponse.ts} (77%) create mode 100644 clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts rename clients/algoliasearch-client-javascript/client-search/model/{inlineResponse2003.ts => searchUserIdsResponse.ts} (68%) rename clients/algoliasearch-client-javascript/client-search/model/{inlineResponse2003HighlightResult.ts => searchUserIdsResponseHighlightResult.ts} (69%) create mode 100644 clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts diff --git a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts new file mode 100644 index 00000000000..e35c3cf793e --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts @@ -0,0 +1,9 @@ +/** + * Assign userID object. + */ +export type AssignUserIdObject = { + /** + * Name of the cluster. + */ + cluster: string; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsObject.ts new file mode 100644 index 00000000000..c970da8ab51 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsObject.ts @@ -0,0 +1,13 @@ +/** + * Assign userID object. + */ +export type BatchAssignUserIdsObject = { + /** + * Name of the cluster. + */ + cluster: string; + /** + * UserIDs to assign. Note you cannot move users with this method. + */ + users: string[]; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts b/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsResponse.ts similarity index 63% rename from clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts rename to clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsResponse.ts index 4f4a290e7ae..a4e64bda6a9 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2004.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsResponse.ts @@ -1,4 +1,4 @@ -export type InlineResponse2004 = { +export type BatchAssignUserIdsResponse = { /** * Date of creation (ISO-8601 format). */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts b/clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsResponse.ts similarity index 83% rename from clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts rename to clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsResponse.ts index 2123001bf49..58171c3bca3 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2001.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/getTopUserIdsResponse.ts @@ -3,7 +3,7 @@ import type { UserId } from './userId'; /** * Array of userIDs and clusters. */ -export type InlineResponse2001 = { +export type GetTopUserIdsResponse = { /** * Mapping of cluster names to top users. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/hasPendingMappingsResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/hasPendingMappingsResponse.ts new file mode 100644 index 00000000000..5384d3e8192 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/hasPendingMappingsResponse.ts @@ -0,0 +1,6 @@ +export type HasPendingMappingsResponse = { + /** + * Date of creation (ISO-8601 format). + */ + createdAt: Date; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts deleted file mode 100644 index 1ca71687929..00000000000 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003Hits.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { InlineResponse2003HighlightResult } from './inlineResponse2003HighlightResult'; - -export type InlineResponse2003Hits = { - userID?: string; - /** - * Name of the cluster. - */ - clusterName?: string; - /** - * Number of records in the cluster. - */ - nbRecords?: number; - /** - * Data size taken by all the users assigned to the cluster. - */ - dataSize?: number; - objectID?: string; - _highlightResult?: InlineResponse2003HighlightResult; -}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts b/clients/algoliasearch-client-javascript/client-search/model/listClustersResponse.ts similarity index 75% rename from clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts rename to clients/algoliasearch-client-javascript/client-search/model/listClustersResponse.ts index 1fec69e7e4f..245e8b9d00b 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2002.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/listClustersResponse.ts @@ -1,7 +1,7 @@ /** * Array of clusters. */ -export type InlineResponse2002 = { +export type ListClustersResponse = { /** * Mapping of cluster names to top users. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts b/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts similarity index 77% rename from clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts rename to clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts index 3a486708b42..c0d9d9c1a96 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse200.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/listUserIdsResponse.ts @@ -3,7 +3,7 @@ import type { UserId } from './userId'; /** * UserIDs data. */ -export type InlineResponse200 = { +export type ListUserIdsResponse = { /** * List of userIDs. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/models.ts b/clients/algoliasearch-client-javascript/client-search/model/models.ts index 20194ff34b4..b30fff3801e 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/models.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/models.ts @@ -1,32 +1,29 @@ /* eslint-disable no-param-reassign */ import type { RequestOptions } from '../utils/types'; +export * from './assignUserIdObject'; export * from './assignUserIdResponse'; export * from './baseIndexSettings'; export * from './baseSearchParams'; export * from './baseSearchResponse'; export * from './baseSearchResponseFacetsStats'; +export * from './batchAssignUserIdsObject'; +export * from './batchAssignUserIdsResponse'; export * from './batchObject'; export * from './batchResponse'; export * from './clearAllSynonymsResponse'; export * from './deleteIndexResponse'; export * from './deleteSynonymResponse'; export * from './errorBase'; +export * from './getTopUserIdsResponse'; +export * from './hasPendingMappingsResponse'; export * from './highlightResult'; export * from './index'; export * from './indexSettings'; export * from './indexSettingsAsSearchParams'; -export * from './inlineObject'; -export * from './inlineObject1'; -export * from './inlineObject2'; -export * from './inlineResponse200'; -export * from './inlineResponse2001'; -export * from './inlineResponse2002'; -export * from './inlineResponse2003'; -export * from './inlineResponse2003HighlightResult'; -export * from './inlineResponse2003Hits'; -export * from './inlineResponse2004'; +export * from './listClustersResponse'; export * from './listIndicesResponse'; +export * from './listUserIdsResponse'; export * from './multipleQueries'; export * from './multipleQueriesObject'; export * from './multipleQueriesResponse'; @@ -45,6 +42,10 @@ export * from './searchParams'; export * from './searchParamsAsString'; export * from './searchResponse'; export * from './searchSynonymsResponse'; +export * from './searchUserIdsObject'; +export * from './searchUserIdsResponse'; +export * from './searchUserIdsResponseHighlightResult'; +export * from './searchUserIdsResponseHits'; export * from './setSettingsResponse'; export * from './snippetResult'; export * from './synonymHit'; diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts new file mode 100644 index 00000000000..c0f5a2c483f --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts @@ -0,0 +1,21 @@ +/** + * OK. + */ +export type SearchUserIdsObject = { + /** + * Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. + */ + query: string; + /** + * Name of the cluster. + */ + clusterName?: string; + /** + * Specify the page to retrieve. + */ + page?: number; + /** + * Set the number of hits per page. + */ + hitsPerPage?: number; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponse.ts similarity index 68% rename from clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts rename to clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponse.ts index cae20286fd1..521512b5f3e 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponse.ts @@ -1,13 +1,13 @@ -import type { InlineResponse2003Hits } from './inlineResponse2003Hits'; +import type { SearchUserIdsResponseHits } from './searchUserIdsResponseHits'; /** * UserIDs data. */ -export type InlineResponse2003 = { +export type SearchUserIdsResponse = { /** * List of user object matching the query. */ - hits: InlineResponse2003Hits[]; + hits: SearchUserIdsResponseHits[]; nbHits: Record; /** * Specify the page to retrieve. diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003HighlightResult.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHighlightResult.ts similarity index 69% rename from clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003HighlightResult.ts rename to clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHighlightResult.ts index c0d139707b6..f9a38bf8d05 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineResponse2003HighlightResult.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHighlightResult.ts @@ -1,6 +1,6 @@ import type { HighlightResult } from './highlightResult'; -export type InlineResponse2003HighlightResult = { +export type SearchUserIdsResponseHighlightResult = { userID?: HighlightResult; clusterName?: HighlightResult; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts new file mode 100644 index 00000000000..d73ebe09e66 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts @@ -0,0 +1,23 @@ +import type { SearchUserIdsResponseHighlightResult } from './searchUserIdsResponseHighlightResult'; +import type { UserId } from './userId'; + +export type SearchUserIdsResponseHits = { + userID?: UserId; + /** + * Name of the cluster. + */ + clusterName?: string; + /** + * Number of records in the cluster. + */ + nbRecords?: number; + /** + * Data size taken by all the users assigned to the cluster. + */ + dataSize?: number; + /** + * UserID of the requested user. Same as userID. + */ + objectID?: string; + _highlightResult?: SearchUserIdsResponseHighlightResult; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts index f62c2100376..a33dc0d7bc0 100644 --- a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts +++ b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts @@ -1,19 +1,18 @@ +import type { AssignUserIdObject } from '../model/assignUserIdObject'; import type { AssignUserIdResponse } from '../model/assignUserIdResponse'; +import type { BatchAssignUserIdsObject } from '../model/batchAssignUserIdsObject'; +import type { BatchAssignUserIdsResponse } from '../model/batchAssignUserIdsResponse'; import type { BatchObject } from '../model/batchObject'; import type { BatchResponse } from '../model/batchResponse'; import type { ClearAllSynonymsResponse } from '../model/clearAllSynonymsResponse'; import type { DeleteIndexResponse } from '../model/deleteIndexResponse'; import type { DeleteSynonymResponse } from '../model/deleteSynonymResponse'; +import type { GetTopUserIdsResponse } from '../model/getTopUserIdsResponse'; +import type { HasPendingMappingsResponse } from '../model/hasPendingMappingsResponse'; import type { IndexSettings } from '../model/indexSettings'; -import type { InlineObject } from '../model/inlineObject'; -import type { InlineObject1 } from '../model/inlineObject1'; -import type { InlineObject2 } from '../model/inlineObject2'; -import type { InlineResponse200 } from '../model/inlineResponse200'; -import type { InlineResponse2001 } from '../model/inlineResponse2001'; -import type { InlineResponse2002 } from '../model/inlineResponse2002'; -import type { InlineResponse2003 } from '../model/inlineResponse2003'; -import type { InlineResponse2004 } from '../model/inlineResponse2004'; +import type { ListClustersResponse } from '../model/listClustersResponse'; import type { ListIndicesResponse } from '../model/listIndicesResponse'; +import type { ListUserIdsResponse } from '../model/listUserIdsResponse'; import { ApiKeyAuth } from '../model/models'; import type { MultipleQueriesObject } from '../model/multipleQueriesObject'; import type { MultipleQueriesResponse } from '../model/multipleQueriesResponse'; @@ -27,6 +26,8 @@ import type { SearchParams } from '../model/searchParams'; import type { SearchParamsAsString } from '../model/searchParamsAsString'; import type { SearchResponse } from '../model/searchResponse'; import type { SearchSynonymsResponse } from '../model/searchSynonymsResponse'; +import type { SearchUserIdsObject } from '../model/searchUserIdsObject'; +import type { SearchUserIdsResponse } from '../model/searchUserIdsResponse'; import type { SetSettingsResponse } from '../model/setSettingsResponse'; import type { SynonymHit } from '../model/synonymHit'; import type { UserId } from '../model/userId'; @@ -130,11 +131,11 @@ export class SearchApi { * * @summary Assign or Move userID. * @param xAlgoliaUserID - UserID to assign. - * @param inlineObject - The inlineObject. + * @param assignUserIdObject - The assignUserIdObject. */ assignUserId( xAlgoliaUserID: Record, - inlineObject: InlineObject + assignUserIdObject: AssignUserIdObject ): Promise { const path = '/1/clusters/mapping'; const headers: Headers = { Accept: 'application/json' }; @@ -146,9 +147,9 @@ export class SearchApi { ); } - if (inlineObject === null || inlineObject === undefined) { + if (assignUserIdObject === null || assignUserIdObject === undefined) { throw new Error( - 'Required parameter inlineObject was null or undefined when calling assignUserId.' + 'Required parameter assignUserIdObject was null or undefined when calling assignUserId.' ); } @@ -159,7 +160,7 @@ export class SearchApi { const request: Request = { method: 'POST', path, - data: inlineObject, + data: assignUserIdObject, }; const requestOptions: RequestOptions = { @@ -213,12 +214,12 @@ export class SearchApi { * * @summary Batch assign userIDs. * @param xAlgoliaUserID - UserID to assign. - * @param inlineObject1 - The inlineObject1. + * @param batchAssignUserIdsObject - The batchAssignUserIdsObject. */ batchAssignUserIds( xAlgoliaUserID: Record, - inlineObject1: InlineObject1 - ): Promise { + batchAssignUserIdsObject: BatchAssignUserIdsObject + ): Promise { const path = '/1/clusters/mapping/batch'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -229,9 +230,12 @@ export class SearchApi { ); } - if (inlineObject1 === null || inlineObject1 === undefined) { + if ( + batchAssignUserIdsObject === null || + batchAssignUserIdsObject === undefined + ) { throw new Error( - 'Required parameter inlineObject1 was null or undefined when calling batchAssignUserIds.' + 'Required parameter batchAssignUserIdsObject was null or undefined when calling batchAssignUserIds.' ); } @@ -242,7 +246,7 @@ export class SearchApi { const request: Request = { method: 'POST', path, - data: inlineObject1, + data: batchAssignUserIdsObject, }; const requestOptions: RequestOptions = { @@ -445,7 +449,7 @@ export class SearchApi { * * @summary Get top userID. */ - getTopUserIds(): Promise { + getTopUserIds(): Promise { const path = '/1/clusters/mapping/top'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -500,7 +504,9 @@ export class SearchApi { * @summary Has pending mappings. * @param getClusters - The getClusters. */ - hasPendingMappins(getClusters?: boolean): Promise { + hasPendingMappings( + getClusters?: boolean + ): Promise { const path = '/1/clusters/mapping/pending'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -526,7 +532,7 @@ export class SearchApi { * * @summary List clusters. */ - listClusters(): Promise { + listClusters(): Promise { const path = '/1/clusters'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -577,7 +583,10 @@ export class SearchApi { * @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). * @param hitsPerPage - Maximum number of objects to retrieve. */ - listUserIds(page?: number, hitsPerPage?: number): Promise { + listUserIds( + page?: number, + hitsPerPage?: number + ): Promise { const path = '/1/clusters/mapping'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -974,23 +983,25 @@ export class SearchApi { * 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. * * @summary Search userID. - * @param inlineObject2 - The inlineObject2. + * @param searchUserIdsObject - The searchUserIdsObject. */ - searchUserIds(inlineObject2: InlineObject2): Promise { + searchUserIds( + searchUserIdsObject: SearchUserIdsObject + ): Promise { const path = '/1/clusters/mapping/search'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (inlineObject2 === null || inlineObject2 === undefined) { + if (searchUserIdsObject === null || searchUserIdsObject === undefined) { throw new Error( - 'Required parameter inlineObject2 was null or undefined when calling searchUserIds.' + 'Required parameter searchUserIdsObject was null or undefined when calling searchUserIds.' ); } const request: Request = { method: 'POST', path, - data: inlineObject2, + data: searchUserIdsObject, }; const requestOptions: RequestOptions = { diff --git a/specs/search/common/schemas/UserId.yml b/specs/search/common/schemas/UserId.yml index 4e6058202ed..e8bae554d77 100644 --- a/specs/search/common/schemas/UserId.yml +++ b/specs/search/common/schemas/UserId.yml @@ -1,4 +1,5 @@ userId: + title: userID type: object description: A userID. properties: diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index bf914127446..43fe29d1fdb 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -16,6 +16,7 @@ post: content: application/json: schema: + title: batchAssignUserIdsObject type: object description: Assign userID object. additionalProperties: false @@ -32,12 +33,11 @@ post: - users responses: '200': - name: batchAssignUserIdsResponse description: OK content: application/json: schema: - title: assignUserIdResponse + title: batchAssignUserIdsResponse type: object additionalProperties: false properties: diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index 62dc6065d65..cfa13852575 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -11,11 +11,11 @@ get: Upon success, the response is 200 OK and contains the following array of userIDs and clusters. responses: '200': - name: getTopUserIdsResponse description: OK content: application/json: schema: + title: getTopUserIdsResponse type: object description: Array of userIDs and clusters. properties: diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 9ec08f5b193..2d9a727139b 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -18,11 +18,11 @@ get: type: boolean responses: '200': - name: hasPendingMappings description: OK content: application/json: schema: + title: hasPendingMappingsResponse type: object additionalProperties: false properties: diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 9e623c33b3e..7c3e4279075 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -9,11 +9,11 @@ get: Upon success, the response is 200 OK and contains the following clusters. responses: '200': - name: listClustersResponse description: OK content: application/json: schema: + title: listClustersResponse type: object description: Array of clusters. properties: diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 0ce36db8185..ffff280c2a3 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -16,6 +16,7 @@ post: content: application/json: schema: + title: searchUserIdsObject type: object description: OK additionalProperties: false @@ -33,11 +34,11 @@ post: - query responses: '200': - name: searchUserIdsResponse description: OK content: application/json: schema: + title: searchUserIdsResponse type: object description: userIDs data. properties: @@ -48,7 +49,7 @@ post: type: object properties: userID: - $ref: '../../commons/schemas/UserId.yml#/userId/properties/userID' + $ref: '../../common/schemas/UserId.yml#/userId/properties/userID' clusterName: $ref: '../../common/schemas/Cluster.yml#/cluster/properties/clusterName' nbRecords: diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index f8d8bcd999e..0decb9d217d 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -13,7 +13,6 @@ get: - $ref: '../../common/parameters.yml#/UserIDInPath' responses: '200': - name: getUserIdResponse description: OK content: application/json: @@ -41,7 +40,6 @@ delete: - $ref: '../../common/parameters.yml#/UserIDInPath' responses: '200': - name: removeUserIdResponse description: OK content: application/json: diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index c08b00df25c..676cda44fca 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -18,6 +18,7 @@ post: content: application/json: schema: + title: assignUserIdObject type: object description: Assign userID object. additionalProperties: false @@ -28,7 +29,6 @@ post: - cluster responses: '200': - name: assignUserIdResponse description: OK content: application/json: @@ -66,11 +66,11 @@ get: - $ref: '../../../common/parameters.yml#/HitsPerPage' responses: '200': - name: listUserIdsResponse description: OK content: application/json: schema: + title: listUserIdsResponse type: object description: UserIDs data. properties: From 12922c47c399c9e438babb50325adba0b00f1989 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Tue, 14 Dec 2021 15:31:53 +0100 Subject: [PATCH 25/28] feat: remove model directory and generate specs --- .../client-search/model/inlineObject.ts | 9 -------- .../client-search/model/inlineObject1.ts | 13 ------------ .../client-search/model/inlineObject2.ts | 21 ------------------- 3 files changed, 43 deletions(-) delete mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts delete mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts delete mode 100644 clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts deleted file mode 100644 index 613c4fa6559..00000000000 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Assign userID object. - */ -export type InlineObject = { - /** - * Name of the cluster. - */ - cluster: string; -}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts deleted file mode 100644 index 7421b0943d6..00000000000 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject1.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Assign userID object. - */ -export type InlineObject1 = { - /** - * Name of the cluster. - */ - cluster: string; - /** - * UserIDs to assign. Note you cannot move users with this method. - */ - users: string[]; -}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts b/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts deleted file mode 100644 index 0a075dd21b9..00000000000 --- a/clients/algoliasearch-client-javascript/client-search/model/inlineObject2.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * OK. - */ -export type InlineObject2 = { - /** - * Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. - */ - query: string; - /** - * Name of the cluster. - */ - clusterName?: string; - /** - * Specify the page to retrieve. - */ - page?: number; - /** - * Set the number of hits per page. - */ - hitsPerPage?: number; -}; From 1945a44d05dedb4e1a1f93378686dd450b20b383 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Thu, 16 Dec 2021 10:53:24 +0100 Subject: [PATCH 26/28] lint java --- .../com/algolia/ApiCallback.java | 1 - .../com/algolia/ApiClient.java | 113 +- .../com/algolia/GzipRequestInterceptor.java | 2 +- .../algoliasearch-core/com/algolia/JSON.java | 33 +- .../com/algolia/ServerConfiguration.java | 7 +- .../com/algolia/ServerVariable.java | 7 +- .../com/algolia/StringUtil.java | 9 +- .../com/algolia/model/AssignUserIdObject.java | 16 +- .../algolia/model/AssignUserIdResponse.java | 18 +- .../com/algolia/model/BaseIndexSettings.java | 69 +- .../com/algolia/model/BaseSearchParams.java | 157 +- .../com/algolia/model/BaseSearchResponse.java | 125 +- .../model/BaseSearchResponseFacetsStats.java | 27 +- .../model/BatchAssignUserIdsObject.java | 19 +- .../model/BatchAssignUserIdsResponse.java | 18 +- .../com/algolia/model/BatchObject.java | 17 +- .../com/algolia/model/BatchResponse.java | 21 +- .../model/ClearAllSynonymsResponse.java | 21 +- .../algolia/model/DeleteIndexResponse.java | 21 +- .../algolia/model/DeleteSynonymResponse.java | 21 +- .../com/algolia/model/ErrorBase.java | 17 +- .../com/algolia/model/GetLogsResponse.java | 19 +- .../model/GetLogsResponseInnerQueries.java | 24 +- .../algolia/model/GetLogsResponseLogs.java | 61 +- .../com/algolia/model/GetTaskResponse.java | 17 +- .../algolia/model/GetTopUserIdsResponse.java | 17 +- .../model/HasPendingMappingsResponse.java | 18 +- .../com/algolia/model/HighlightResult.java | 26 +- .../com/algolia/model/Index.java | 60 +- .../com/algolia/model/IndexSettings.java | 294 +- .../model/IndexSettingsAsSearchParams.java | 240 +- .../algolia/model/ListClustersResponse.java | 16 +- .../algolia/model/ListIndicesResponse.java | 22 +- .../algolia/model/ListUserIdsResponse.java | 17 +- .../com/algolia/model/MultipleQueries.java | 32 +- .../algolia/model/MultipleQueriesObject.java | 21 +- .../model/MultipleQueriesResponse.java | 19 +- .../com/algolia/model/Operation.java | 21 +- .../algolia/model/OperationIndexObject.java | 33 +- .../algolia/model/OperationIndexResponse.java | 21 +- .../com/algolia/model/RankingInfo.java | 62 +- .../model/RankingInfoMatchedGeoLocation.java | 24 +- .../com/algolia/model/Record.java | 32 +- .../algolia/model/RemoveUserIdResponse.java | 18 +- .../com/algolia/model/SaveObjectResponse.java | 24 +- .../algolia/model/SaveSynonymResponse.java | 24 +- .../algolia/model/SaveSynonymsResponse.java | 21 +- .../com/algolia/model/SearchHits.java | 19 +- .../com/algolia/model/SearchParams.java | 384 +- .../com/algolia/model/SearchResponse.java | 130 +- .../algolia/model/SearchSynonymsResponse.java | 23 +- .../algolia/model/SearchUserIdsObject.java | 31 +- .../algolia/model/SearchUserIdsResponse.java | 29 +- .../SearchUserIdsResponseHighlightResult.java | 22 +- .../model/SearchUserIdsResponseHits.java | 35 +- .../algolia/model/SetSettingsResponse.java | 21 +- .../com/algolia/model/SnippetResult.java | 20 +- .../com/algolia/model/SynonymHit.java | 40 +- .../model/SynonymHitHighlightResult.java | 20 +- .../com/algolia/model/UserId.java | 25 +- .../com/algolia/search/SearchApi.java | 3636 +++++++++-------- 61 files changed, 3264 insertions(+), 3093 deletions(-) diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiCallback.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiCallback.java index aa42730dca9..6b149c2b325 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiCallback.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiCallback.java @@ -1,6 +1,5 @@ package com.algolia; -import java.io.IOException; import java.util.List; import java.util.Map; 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 4d6da2e5a0b..6bca7ae6f29 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 @@ -5,35 +5,26 @@ 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; import java.time.LocalDate; import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; 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; -import okio.BufferedSink; -import okio.Okio; public class ApiClient { @@ -123,9 +114,9 @@ public boolean isVerifyingSsl() { } /** - * 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. + * 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 @@ -146,8 +137,8 @@ public InputStream getSslCaCert() { } /** - * Configure the CA certificate to be trusted when making https requests. - * Use null to reset to default. + * 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 @@ -163,8 +154,7 @@ public KeyManager[] getKeyManagers() { } /** - * Configure client keys to use for authorization in an SSL session. - * Use null to reset to default. + * 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 @@ -272,9 +262,8 @@ public int getConnectTimeout() { } /** - * Sets the connect timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * Sets the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values + * must be between 1 and {@link Integer#MAX_VALUE}. * * @param connectionTimeout connection timeout in milliseconds * @return Api client @@ -298,9 +287,8 @@ public int getReadTimeout() { } /** - * Sets the read timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * Sets the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must + * be between 1 and {@link Integer#MAX_VALUE}. * * @param readTimeout read timeout in milliseconds * @return Api client @@ -324,9 +312,8 @@ public int getWriteTimeout() { } /** - * Sets the write timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * Sets the write timeout (in milliseconds). A value of 0 means no timeout, otherwise values must + * be between 1 and {@link Integer#MAX_VALUE}. * * @param writeTimeout connection timeout in milliseconds * @return Api client @@ -354,7 +341,7 @@ public String parameterToString(Object param) { param instanceof OffsetDateTime || param instanceof LocalDate ) { - //Serialize to json string and remove the " enclosing characters + // Serialize to json string and remove the " enclosing characters String jsonStr = json.serialize(param); return jsonStr.substring(1, jsonStr.length() - 1); } else if (param instanceof Collection) { @@ -374,7 +361,7 @@ public String parameterToString(Object param) { /** * Formats the specified query parameter to a list containing a single {@code Pair} object. * - * Note that {@code value} must not be a collection. + *

Note that {@code value} must not be a collection. * * @param name The name of the parameter. * @param value The value of the parameter. @@ -400,7 +387,7 @@ public List parameterToPair(String name, Object value) { /** * Formats the specified collection query parameters to a list of {@code Pair} objects. * - * Note that the values of each of the returned Pair objects are percent-encoded. + *

Note that the values of each of the returned Pair objects are percent-encoded. * * @param collectionFormat The collection format of the parameter. * @param name The name of the parameter. @@ -489,8 +476,7 @@ public String collectionPathParameterToString( } /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif + * Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif * * @param filename The filename to be sanitized * @return The sanitized filename @@ -500,13 +486,9 @@ public String sanitizeFilename(String filename) { } /** - * 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 + * 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 + * * @param mime MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ @@ -517,13 +499,12 @@ public boolean isJsonMime(String mime) { } /** - * 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) + * 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). + * @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) { @@ -538,13 +519,12 @@ public String selectHeaderAccept(String[] accepts) { } /** - * 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. + * 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. + * @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("*/*")) { @@ -573,15 +553,15 @@ public String escapeString(String str) { } /** - * Deserialize response body to Java object, according to the return type and - * the Content-Type response header. + * Deserialize response body to Java object, according to the return type and the Content-Type + * response header. * * @param Type * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws ApiException If fail to deserialize response body, i.e. cannot read response body - * or the Content-Type of the response is not supported. + * @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) @@ -635,8 +615,8 @@ public T deserialize(Response response, Type returnType) } /** - * Serialize the given Java object into request body according to the object's - * class and the request Content-Type. + * Serialize the given Java object into request body according to the object's class and the + * request Content-Type. * * @param obj The Java object * @param contentType The request Content-Type @@ -684,9 +664,8 @@ public ApiResponse execute(Call call) throws ApiException { * @param returnType The return type used to deserialize HTTP response body * @param The return type corresponding to (same with) returnType * @param call Call - * @return ApiResponse object containing response status, headers and - * data, which is a Java object deserialized from response body and would be null - * when returnType is null. + * @return ApiResponse object containing response status, headers and data, which is a Java object + * deserialized from response body and would be null when returnType is null. * @throws ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) @@ -775,8 +754,8 @@ public void onResponse(Call call, Response response) * @param response Response * @param returnType Return type * @return Type - * @throws ApiException If the response has an unsuccessful status code or - * fail to deserialize the response body + * @throws ApiException If the response has an unsuccessful status code or fail to deserialize the + * response body */ public T handleResponse(Response response, Type returnType) throws ApiException { @@ -827,7 +806,8 @@ public T handleResponse(Response response, Type returnType) * Build HTTP call with the given options. * * @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 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 @@ -871,7 +851,8 @@ public Call buildCall( * Build an HTTP request with the given options. * * @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 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 @@ -1086,8 +1067,8 @@ public RequestBody buildRequestBodyFormEncoding( } /** - * Build a multipart (file uploading) request body with the given form parameters, - * which could contain text fields and file fields. + * 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 @@ -1138,8 +1119,8 @@ public String guessContentTypeFromFile(File file) { } /** - * Get network interceptor to add it to the httpClient to track download progress for - * async requests. + * Get network interceptor to add it to the httpClient to track download progress for async + * requests. */ private Interceptor getProgressInterceptor() { return new Interceptor() { @@ -1160,8 +1141,8 @@ public Response intercept(Interceptor.Chain chain) throws IOException { } /** - * Apply SSL related settings to httpClient according to the current values of - * verifyingSsl and sslCaCert. + * Apply SSL related settings to httpClient according to the current values of verifyingSsl and + * sslCaCert. */ private void applySslSettings() { try { 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 index 45b7bf54ad1..3a054245399 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/GzipRequestInterceptor.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/GzipRequestInterceptor.java @@ -10,7 +10,7 @@ /** * Encodes request bodies using gzip. * - * Taken from https://github.com/square/okhttp/issues/350 + *

Taken from https://github.com/square/okhttp/issues/350 */ class GzipRequestInterceptor implements Interceptor { 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 fd92dc22563..fff9b8547c2 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 @@ -10,7 +10,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.gsonfire.GsonFireBuilder; -import io.gsonfire.TypeSelector; import java.io.IOException; import java.io.StringReader; import java.lang.reflect.Type; @@ -21,8 +20,6 @@ import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; -import java.util.HashMap; -import java.util.Locale; import java.util.Map; import okio.ByteString; @@ -57,7 +54,8 @@ private static String getDiscriminatorValue( } /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * 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. @@ -125,8 +123,8 @@ public String serialize(Object obj) { /** * Deserialize the given JSON string to Java object. * - * @param Type - * @param body The JSON string + * @param Type + * @param body The JSON string * @param returnType The type to deserialize into * @return The deserialized Java object */ @@ -135,7 +133,8 @@ public T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + // see + // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { @@ -152,9 +151,7 @@ public T deserialize(String body, Type returnType) { } } - /** - * Gson TypeAdapter for Byte Array type - */ + /** Gson TypeAdapter for Byte Array type */ public class ByteArrayAdapter extends TypeAdapter { @Override @@ -180,9 +177,7 @@ public byte[] read(JsonReader in) throws IOException { } } - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ + /** Gson TypeAdapter for JSR310 OffsetDateTime type */ public static class OffsetDateTimeTypeAdapter extends TypeAdapter { @@ -225,9 +220,7 @@ public OffsetDateTime read(JsonReader in) throws IOException { } } - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ + /** Gson TypeAdapter for JSR310 LocalDate type */ public class LocalDateTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -277,9 +270,8 @@ public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { } /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). + * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" format + * will be used (more efficient than SimpleDateFormat). */ public static class SqlDateTypeAdapter extends TypeAdapter { @@ -333,8 +325,7 @@ public java.sql.Date read(JsonReader in) throws IOException { } /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. + * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be used. */ public static class DateTypeAdapter extends TypeAdapter { 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 index 6dbe7a0216d..2079f056c98 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerConfiguration.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerConfiguration.java @@ -2,9 +2,7 @@ import java.util.Map; -/** - * Representing a Server configuration. - */ +/** Representing a Server configuration. */ public class ServerConfiguration { public String URL; @@ -14,7 +12,8 @@ public class ServerConfiguration { /** * @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. + * @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, 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 index 52b3a21d57e..c0e8b2aa675 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerVariable.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ServerVariable.java @@ -2,9 +2,7 @@ import java.util.HashSet; -/** - * Representing a Server Variable for server URL template substitution. - */ +/** Representing a Server Variable for server URL template substitution. */ public class ServerVariable { public String description; @@ -14,7 +12,8 @@ public class ServerVariable { /** * @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. + * @param enumValues An enumeration of string values to be used if the substitution options are + * from a limited set. */ public ServerVariable( String description, 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 index 3f0a8a25da0..af841ec05cd 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/StringUtil.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/StringUtil.java @@ -27,11 +27,10 @@ public static boolean containsIgnoreCase(String[] array, String value) { /** * 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. + *

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 array The array of strings * @param separator The separator * @return the resulting string */ @@ -52,7 +51,7 @@ public static String join(String[] array, String separator) { /** * Join a list of strings with the given separator. * - * @param list The list of strings + * @param list The list of strings * @param separator The separator * @return the resulting string */ 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 08202add408..3e0fdc73325 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,19 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * Assign userID object. - */ +/** Assign userID object. */ @ApiModel(description = "Assign userID object.") public class AssignUserIdObject { @@ -29,8 +21,9 @@ public AssignUserIdObject cluster(String cluster) { /** * Name of the cluster. + * * @return cluster - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "c11-test", @@ -72,8 +65,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdResponse.java index c94dc25bf43..f18853c2eb4 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * AssignUserIdResponse - */ - +/** AssignUserIdResponse */ public class AssignUserIdResponse { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -30,8 +20,9 @@ public AssignUserIdResponse createdAt(OffsetDateTime createdAt) { /** * Date of creation (ISO-8601 format). + * * @return createdAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -75,8 +66,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 56b6ed8c3d4..5ac1b4dfa23 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,24 +1,14 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -/** - * BaseIndexSettings - */ - +/** BaseIndexSettings */ public class BaseIndexSettings { public static final String SERIALIZED_NAME_REPLICAS = "replicas"; @@ -104,8 +94,9 @@ public BaseIndexSettings addReplicasItem(String replicasItem) { /** * Creates replicas, exact copies of an index. + * * @return replicas - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Creates replicas, exact copies of an index.") public List getReplicas() { @@ -123,8 +114,9 @@ public BaseIndexSettings paginationLimitedTo(Integer paginationLimitedTo) { /** * Set the maximum number of hits accessible via pagination. + * * @return paginationLimitedTo - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Set the maximum number of hits accessible via pagination." @@ -156,8 +148,9 @@ public BaseIndexSettings addDisableTypoToleranceOnWordsItem( /** * A list of words for which you want to turn off typo tolerance. + * * @return disableTypoToleranceOnWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "A list of words for which you want to turn off typo tolerance." @@ -191,8 +184,9 @@ public BaseIndexSettings addAttributesToTransliterateItem( /** * Specify on which attributes to apply transliteration. + * * @return attributesToTransliterate - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Specify on which attributes to apply transliteration." @@ -226,8 +220,9 @@ public BaseIndexSettings addCamelCaseAttributesItem( /** * List of attributes on which to do a decomposition of camel case words. + * * @return camelCaseAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which to do a decomposition of camel case words." @@ -259,12 +254,15 @@ public BaseIndexSettings putDecompoundedAttributesItem( } /** - * Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding. + * Specify on which attributes in your index Algolia should apply word segmentation, also known as + * decompounding. + * * @return decompoundedAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding." + value = "Specify on which attributes in your index Algolia should apply word segmentation, also" + + " known as decompounding." ) public Map getDecompoundedAttributes() { return decompoundedAttributes; @@ -290,12 +288,15 @@ public BaseIndexSettings addIndexLanguagesItem(String indexLanguagesItem) { } /** - * Sets the languages at the index level for language-specific processing such as tokenization and normalization. + * Sets the languages at the index level for language-specific processing such as tokenization and + * normalization. + * * @return indexLanguages - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Sets the languages at the index level for language-specific processing such as tokenization and normalization." + value = "Sets the languages at the index level for language-specific processing such as" + + " tokenization and normalization." ) public List getIndexLanguages() { return indexLanguages; @@ -311,12 +312,15 @@ public BaseIndexSettings filterPromotes(Boolean filterPromotes) { } /** - * Whether promoted results should match the filters of the current search, except for geographic filters. + * Whether promoted results should match the filters of the current search, except for geographic + * filters. + * * @return filterPromotes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Whether promoted results should match the filters of the current search, except for geographic filters." + value = "Whether promoted results should match the filters of the current search, except for" + + " geographic filters." ) public Boolean getFilterPromotes() { return filterPromotes; @@ -345,8 +349,9 @@ public BaseIndexSettings addDisablePrefixOnAttributesItem( /** * List of attributes on which you want to disable prefix matching. + * * @return disablePrefixOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable prefix matching." @@ -370,8 +375,9 @@ public BaseIndexSettings allowCompressionOfIntegerArray( /** * Enables compression of large integer arrays. + * * @return allowCompressionOfIntegerArray - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables compression of large integer arrays.") public Boolean getAllowCompressionOfIntegerArray() { @@ -403,8 +409,9 @@ public BaseIndexSettings addNumericAttributesForFilteringItem( /** * List of numeric attributes that can be used as numerical filters. + * * @return numericAttributesForFiltering - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of numeric attributes that can be used as numerical filters." @@ -434,8 +441,9 @@ public BaseIndexSettings putUserDataItem(String key, Object userDataItem) { /** * Lets you store custom data in your indices. + * * @return userData - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { @@ -564,8 +572,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 afeb82028a1..504405ca146 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,14 +1,7 @@ package com.algolia.model; -import com.algolia.model.OneOfintegerstring; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; @@ -16,10 +9,7 @@ import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** - * BaseSearchParams - */ - +/** BaseSearchParams */ public class BaseSearchParams { public static final String SERIALIZED_NAME_QUERY = "query"; @@ -208,8 +198,9 @@ public BaseSearchParams query(String query) { /** * The text to search in the index. + * * @return query - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { @@ -226,12 +217,15 @@ public BaseSearchParams similarQuery(String similarQuery) { } /** - * Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. + * Overrides the query parameter and performs a more generic search that can be used to find + * \"similar\" results. + * * @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." + value = "Overrides the query parameter and performs a more generic search that can be used to" + + " find \"similar\" results." ) public String getSimilarQuery() { return similarQuery; @@ -248,8 +242,9 @@ public BaseSearchParams filters(String filters) { /** * Filter the query with numeric, facet and/or tag filters. + * * @return filters - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Filter the query with numeric, facet and/or tag filters." @@ -277,8 +272,9 @@ public BaseSearchParams addFacetFiltersItem(String facetFiltersItem) { /** * Filter hits by facet value. + * * @return facetFilters - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Filter hits by facet value.") public List getFacetFilters() { @@ -303,12 +299,15 @@ public BaseSearchParams addOptionalFiltersItem(String optionalFiltersItem) { } /** - * Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. + * Create filters for ranking purposes, where records that match the filter are ranked higher, or + * lower in the case of a negative optional filter. + * * @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." + 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; @@ -333,8 +332,9 @@ public BaseSearchParams addNumericFiltersItem(String numericFiltersItem) { /** * Filter on numeric attributes. + * * @return numericFilters - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Filter on numeric attributes.") public List getNumericFilters() { @@ -360,8 +360,9 @@ public BaseSearchParams addTagFiltersItem(String tagFiltersItem) { /** * Filter hits by tags. + * * @return tagFilters - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Filter hits by tags.") public List getTagFilters() { @@ -379,8 +380,9 @@ public BaseSearchParams sumOrFiltersScores(Boolean sumOrFiltersScores) { /** * Determines how to calculate the total score for filtering. + * * @return sumOrFiltersScores - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Determines how to calculate the total score for filtering." @@ -408,8 +410,9 @@ public BaseSearchParams addFacetsItem(String facetsItem) { /** * Retrieve facets and their facet values. + * * @return facets - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Retrieve facets and their facet values.") public List getFacets() { @@ -427,8 +430,9 @@ public BaseSearchParams maxValuesPerFacet(Integer maxValuesPerFacet) { /** * Maximum number of facet values to return for each facet during a regular search. + * * @return maxValuesPerFacet - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Maximum number of facet values to return for each facet during a regular search." @@ -448,8 +452,9 @@ public BaseSearchParams facetingAfterDistinct(Boolean facetingAfterDistinct) { /** * Force faceting to be applied after de-duplication (via the Distinct setting). + * * @return facetingAfterDistinct - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Force faceting to be applied after de-duplication (via the Distinct setting)." @@ -469,8 +474,9 @@ public BaseSearchParams sortFacetValuesBy(String sortFacetValuesBy) { /** * Controls how facet values are fetched. + * * @return sortFacetValuesBy - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Controls how facet values are fetched.") public String getSortFacetValuesBy() { @@ -488,8 +494,9 @@ public BaseSearchParams page(Integer page) { /** * Specify the page to retrieve. + * * @return page - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { @@ -507,8 +514,9 @@ public BaseSearchParams offset(Integer offset) { /** * Specify the offset of the first hit to return. + * * @return offset - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specify the offset of the first hit to return.") public Integer getOffset() { @@ -525,11 +533,10 @@ public BaseSearchParams length(Integer length) { } /** - * Set the number of hits to retrieve (used only with offset). - * minimum: 1 - * maximum: 1000 + * Set the number of hits to retrieve (used only with offset). minimum: 1 maximum: 1000 + * * @return length - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Set the number of hits to retrieve (used only with offset)." @@ -549,11 +556,13 @@ public BaseSearchParams aroundLatLng(String aroundLatLng) { /** * Search for entries around a central geolocation, enabling a geo search within a circular area. + * * @return aroundLatLng - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Search for entries around a central geolocation, enabling a geo search within a circular area." + value = "Search for entries around a central geolocation, enabling a geo search within a circular" + + " area." ) public String getAroundLatLng() { return aroundLatLng; @@ -569,12 +578,15 @@ public BaseSearchParams aroundLatLngViaIP(Boolean aroundLatLngViaIP) { } /** - * Search for entries around a given location automatically computed from the requester’s IP address. + * Search for entries around a given location automatically computed from the requester’s IP + * address. + * * @return aroundLatLngViaIP - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Search for entries around a given location automatically computed from the requester’s IP address." + value = "Search for entries around a given location automatically computed from the requester’s" + + " IP address." ) public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -591,8 +603,9 @@ public BaseSearchParams aroundRadius(OneOfintegerstring aroundRadius) { /** * Define the maximum radius for a geo search (in meters). + * * @return aroundRadius - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Define the maximum radius for a geo search (in meters)." @@ -612,11 +625,13 @@ public BaseSearchParams aroundPrecision(Integer aroundPrecision) { /** * Precision of geo search (in meters), to add grouping by geo location to the ranking formula. + * * @return aroundPrecision - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Precision of geo search (in meters), to add grouping by geo location to the ranking formula." + value = "Precision of geo search (in meters), to add grouping by geo location to the ranking" + + " formula." ) public Integer getAroundPrecision() { return aroundPrecision; @@ -632,10 +647,10 @@ public BaseSearchParams minimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geo search when aroundRadius is not set. - * minimum: 1 + * Minimum radius (in meters) used for a geo search when aroundRadius is not set. minimum: 1 + * * @return minimumAroundRadius - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Minimum radius (in meters) used for a geo search when aroundRadius is not set." @@ -667,8 +682,9 @@ public BaseSearchParams addInsideBoundingBoxItem( /** * Search inside a rectangular area (in geo coordinates). + * * @return insideBoundingBox - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Search inside a rectangular area (in geo coordinates)." @@ -696,8 +712,9 @@ public BaseSearchParams addInsidePolygonItem(BigDecimal insidePolygonItem) { /** * Search inside a polygon (in geo coordinates). + * * @return insidePolygon - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Search inside a polygon (in geo coordinates).") public List getInsidePolygon() { @@ -722,12 +739,21 @@ public BaseSearchParams addNaturalLanguagesItem(String naturalLanguagesItem) { } /** - * 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. + * 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. + * * @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." + 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; @@ -752,8 +778,9 @@ public BaseSearchParams addRuleContextsItem(String ruleContextsItem) { /** * Enables contextual rules. + * * @return ruleContexts - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables contextual rules.") public List getRuleContexts() { @@ -771,8 +798,9 @@ public BaseSearchParams personalizationImpact(Integer personalizationImpact) { /** * Define the impact of the Personalization feature. + * * @return personalizationImpact - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Define the impact of the Personalization feature.") public Integer getPersonalizationImpact() { @@ -790,8 +818,9 @@ public BaseSearchParams userToken(String userToken) { /** * Associates a certain user token with the current search. + * * @return userToken - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Associates a certain user token with the current search." @@ -811,8 +840,9 @@ public BaseSearchParams getRankingInfo(Boolean getRankingInfo) { /** * Retrieve detailed ranking information. + * * @return getRankingInfo - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Retrieve detailed ranking information.") public Boolean getGetRankingInfo() { @@ -830,8 +860,9 @@ public BaseSearchParams clickAnalytics(Boolean clickAnalytics) { /** * Enable the Click Analytics feature. + * * @return clickAnalytics - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enable the Click Analytics feature.") public Boolean getClickAnalytics() { @@ -849,8 +880,9 @@ public BaseSearchParams analytics(Boolean analytics) { /** * Whether the current query will be taken into account in the Analytics. + * * @return analytics - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether the current query will be taken into account in the Analytics." @@ -878,8 +910,9 @@ public BaseSearchParams addAnalyticsTagsItem(String analyticsTagsItem) { /** * List of tags to apply to the query for analytics purposes. + * * @return analyticsTags - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of tags to apply to the query for analytics purposes." @@ -899,8 +932,9 @@ public BaseSearchParams percentileComputation(Boolean percentileComputation) { /** * Whether to include or exclude a query from the processing-time percentile computation. + * * @return percentileComputation - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to include or exclude a query from the processing-time percentile computation." @@ -920,8 +954,9 @@ public BaseSearchParams enableABTest(Boolean enableABTest) { /** * Whether this search should participate in running AB tests. + * * @return enableABTest - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether this search should participate in running AB tests." @@ -941,8 +976,9 @@ public BaseSearchParams enableReRanking(Boolean enableReRanking) { /** * Whether this search should use AI Re-Ranking. + * * @return enableReRanking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Whether this search should use AI Re-Ranking.") public Boolean getEnableReRanking() { @@ -1214,8 +1250,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 461b2ef07f3..65bd5dfd3f9 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,24 +1,12 @@ package com.algolia.model; -import com.algolia.model.BaseSearchResponseFacetsStats; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; -/** - * BaseSearchResponse - */ - +/** BaseSearchResponse */ public class BaseSearchResponse { public static final String SERIALIZED_NAME_AB_TEST_I_D = "abTestID"; @@ -153,12 +141,15 @@ public BaseSearchResponse abTestID(Integer abTestID) { } /** - * If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID. + * If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test + * ID. + * * @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." + 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; @@ -174,12 +165,15 @@ public BaseSearchResponse abTestVariantID(Integer abTestVariantID) { } /** - * If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used. + * If a search encounters an index that is being A/B tested, abTestVariantID reports the variant + * ID of the index used. + * * @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." + 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; @@ -196,8 +190,9 @@ public BaseSearchResponse aroundLatLng(String aroundLatLng) { /** * The computed geo location. + * * @return aroundLatLng - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The computed geo location.") public String getAroundLatLng() { @@ -214,12 +209,15 @@ public BaseSearchResponse automaticRadius(String automaticRadius) { } /** - * The automatically computed radius. For legacy reasons, this parameter is a string and not an integer. + * The automatically computed radius. For legacy reasons, this parameter is a string and not an + * integer. + * * @return automaticRadius - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The automatically computed radius. For legacy reasons, this parameter is a string and not an integer." + value = "The automatically computed radius. For legacy reasons, this parameter is a string and" + + " not an integer." ) public String getAutomaticRadius() { return automaticRadius; @@ -238,8 +236,9 @@ public BaseSearchResponse exhaustiveFacetsCount( /** * Whether the facet count is exhaustive or approximate. + * * @return exhaustiveFacetsCount - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether the facet count is exhaustive or approximate." @@ -259,8 +258,9 @@ public BaseSearchResponse exhaustiveNbHits(Boolean exhaustiveNbHits) { /** * Indicate if the nbHits count was exhaustive or approximate + * * @return exhaustiveNbHits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -280,13 +280,16 @@ public BaseSearchResponse exhaustiveTypo(Boolean exhaustiveTypo) { } /** - * Indicate if the typo-tolerence search was exhaustive or approximate (only included when typo-tolerance is enabled) + * Indicate if the typo-tolerence search was exhaustive or approximate (only included when + * typo-tolerance is enabled) + * * @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)" + value = "Indicate if the typo-tolerence search was exhaustive or approximate (only included when" + + " typo-tolerance is enabled)" ) public Boolean getExhaustiveTypo() { return exhaustiveTypo; @@ -314,8 +317,9 @@ public BaseSearchResponse putFacetsItem( /** * A mapping of each facet name to the corresponding facet counts. + * * @return facets - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "{\"category\":{\"food\":1,\"tech\":42}}", @@ -349,8 +353,9 @@ public BaseSearchResponse putFacetsStatsItem( /** * Statistics for numerical facets. + * * @return facetsStats - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Statistics for numerical facets.") public Map getFacetsStats() { @@ -370,8 +375,9 @@ public BaseSearchResponse hitsPerPage(Integer hitsPerPage) { /** * Set the number of hits per page. + * * @return hitsPerPage - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Set the number of hits per page.") public Integer getHitsPerPage() { @@ -389,8 +395,9 @@ public BaseSearchResponse index(String index) { /** * Index name used for the query. + * * @return index - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "indexName", @@ -410,13 +417,16 @@ public BaseSearchResponse indexUsed(String indexUsed) { } /** - * 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. + * 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. + * * @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." + 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; @@ -433,8 +443,9 @@ public BaseSearchResponse message(String message) { /** * Used to return warnings about the query. + * * @return message - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Used to return warnings about the query.") public String getMessage() { @@ -452,8 +463,9 @@ public BaseSearchResponse nbHits(Integer nbHits) { /** * Number of hits that the search query matched. + * * @return nbHits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "20", @@ -475,8 +487,9 @@ public BaseSearchResponse nbPages(Integer nbPages) { /** * Number of pages available for the current query + * * @return nbPages - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "1", @@ -498,8 +511,9 @@ public BaseSearchResponse nbSortedHits(Integer nbSortedHits) { /** * The number of hits selected and sorted by the relevant sort algorithm + * * @return nbSortedHits - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "20", @@ -520,8 +534,9 @@ public BaseSearchResponse page(Integer page) { /** * Specify the page to retrieve. + * * @return page - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Specify the page to retrieve.") public Integer getPage() { @@ -539,8 +554,9 @@ public BaseSearchResponse params(String params) { /** * A url-encoded string of all search parameters. + * * @return params - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "query=a&hitsPerPage=20", @@ -562,8 +578,9 @@ public BaseSearchResponse parsedQuery(String parsedQuery) { /** * The query string that will be searched, after normalization. + * * @return parsedQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The query string that will be searched, after normalization." @@ -583,8 +600,9 @@ public BaseSearchResponse processingTimeMS(Integer processingTimeMS) { /** * Time the server took to process the request, in milliseconds. + * * @return processingTimeMS - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "20", @@ -606,8 +624,9 @@ public BaseSearchResponse query(String query) { /** * The text to search in the index. + * * @return query - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { @@ -624,12 +643,15 @@ public BaseSearchResponse queryAfterRemoval(String queryAfterRemoval) { } /** - * A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set. + * A markup text indicating which parts of the original query have been removed in order to + * retrieve a non-empty result set. + * * @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." + 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; @@ -646,8 +668,9 @@ public BaseSearchResponse serverUsed(String serverUsed) { /** * Actual host name of the server that processed the request. + * * @return serverUsed - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Actual host name of the server that processed the request." @@ -675,8 +698,9 @@ public BaseSearchResponse putUserDataItem(String key, Object userDataItem) { /** * Lets you store custom data in your indices. + * * @return userData - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { @@ -847,8 +871,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 0658e5b3d82..390f261989d 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,20 +1,10 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * BaseSearchResponseFacetsStats - */ - +/** BaseSearchResponseFacetsStats */ public class BaseSearchResponseFacetsStats { public static final String SERIALIZED_NAME_MIN = "min"; @@ -44,8 +34,9 @@ public BaseSearchResponseFacetsStats min(Integer min) { /** * The minimum value in the result set. + * * @return min - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The minimum value in the result set.") public Integer getMin() { @@ -63,8 +54,9 @@ public BaseSearchResponseFacetsStats max(Integer max) { /** * The maximum value in the result set. + * * @return max - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The maximum value in the result set.") public Integer getMax() { @@ -82,8 +74,9 @@ public BaseSearchResponseFacetsStats avg(Integer avg) { /** * The average facet value in the result set. + * * @return avg - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The average facet value in the result set.") public Integer getAvg() { @@ -101,8 +94,9 @@ public BaseSearchResponseFacetsStats sum(Integer sum) { /** * The sum of all values in the result set. + * * @return sum - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The sum of all values in the result set.") public Integer getSum() { @@ -148,8 +142,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 195df0d0390..867b2e25eb7 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,21 +1,13 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * Assign userID object. - */ +/** Assign userID object. */ @ApiModel(description = "Assign userID object.") public class BatchAssignUserIdsObject { @@ -36,8 +28,9 @@ public BatchAssignUserIdsObject cluster(String cluster) { /** * Name of the cluster. + * * @return cluster - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "c11-test", @@ -64,8 +57,9 @@ public BatchAssignUserIdsObject addUsersItem(String usersItem) { /** * userIDs to assign. Note you cannot move users with this method. + * * @return users - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -110,8 +104,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsResponse.java index 4c28f13ed15..beff188d922 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * BatchAssignUserIdsResponse - */ - +/** BatchAssignUserIdsResponse */ public class BatchAssignUserIdsResponse { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -30,8 +20,9 @@ public BatchAssignUserIdsResponse createdAt(OffsetDateTime createdAt) { /** * Date of creation (ISO-8601 format). + * * @return createdAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -75,8 +66,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 2d512e0a5c8..e3f053211a0 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,22 +1,13 @@ package com.algolia.model; -import com.algolia.model.Operation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * The `batch` requests. - */ +/** The `batch` requests. */ @ApiModel(description = "The `batch` requests.") public class BatchObject { @@ -40,8 +31,9 @@ public BatchObject addRequestsItem(Operation requestsItem) { /** * Get requests + * * @return requests - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public List getRequests() { @@ -79,8 +71,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 f9aa706506f..9d8a55c551a 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,22 +1,12 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * BatchResponse - */ - +/** BatchResponse */ public class BatchResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -36,8 +26,9 @@ public BatchResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { @@ -63,8 +54,9 @@ public BatchResponse addObjectIDsItem(String objectIDsItem) { /** * List of objectID. + * * @return objectIDs - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "List of objectID.") public List getObjectIDs() { @@ -109,8 +101,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ClearAllSynonymsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ClearAllSynonymsResponse.java index 7dda9fbc1b9..f3f206367c6 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ClearAllSynonymsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ClearAllSynonymsResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * ClearAllSynonymsResponse - */ - +/** ClearAllSynonymsResponse */ public class ClearAllSynonymsResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -35,8 +25,9 @@ public ClearAllSynonymsResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -57,8 +48,9 @@ public ClearAllSynonymsResponse updatedAt(OffsetDateTime updatedAt) { /** * Date of last update (ISO-8601 format). + * * @return updatedAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -106,8 +98,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteIndexResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteIndexResponse.java index 3a0c876fbc0..3f8c11a7fbb 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteIndexResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteIndexResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * DeleteIndexResponse - */ - +/** DeleteIndexResponse */ public class DeleteIndexResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -35,8 +25,9 @@ public DeleteIndexResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { @@ -54,8 +45,9 @@ public DeleteIndexResponse deletedAt(OffsetDateTime deletedAt) { /** * Date of deletion (ISO-8601 format). + * * @return deletedAt - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Date of deletion (ISO-8601 format).") public OffsetDateTime getDeletedAt() { @@ -100,8 +92,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSynonymResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSynonymResponse.java index b1609671b0a..f087b817349 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSynonymResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/DeleteSynonymResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * DeleteSynonymResponse - */ - +/** DeleteSynonymResponse */ public class DeleteSynonymResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -35,8 +25,9 @@ public DeleteSynonymResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -57,8 +48,9 @@ public DeleteSynonymResponse deletedAt(OffsetDateTime deletedAt) { /** * Date of deletion (ISO-8601 format). + * * @return deletedAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -106,8 +98,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 5b906770bd1..95ad6123009 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,21 +1,12 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.HashMap; -import java.util.Map; import java.util.Objects; -/** - * Error. - */ +/** Error. */ @ApiModel(description = "Error.") public class ErrorBase extends HashMap { @@ -31,8 +22,9 @@ public ErrorBase message(String message) { /** * Get message + * * @return message - **/ + */ @javax.annotation.Nullable @ApiModelProperty(example = "Invalid Application-Id or API-Key", value = "") public String getMessage() { @@ -71,8 +63,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 9a4bf14fdc4..e3792bb9d3c 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,23 +1,12 @@ package com.algolia.model; -import com.algolia.model.GetLogsResponseLogs; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * GetLogsResponse - */ - +/** GetLogsResponse */ public class GetLogsResponse { public static final String SERIALIZED_NAME_LOGS = "logs"; @@ -37,8 +26,9 @@ public GetLogsResponse addLogsItem(GetLogsResponseLogs logsItem) { /** * Get logs + * * @return logs - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "") public List getLogs() { @@ -76,8 +66,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 7540165b024..83e28e53667 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,20 +1,10 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * GetLogsResponseInnerQueries - */ - +/** GetLogsResponseInnerQueries */ public class GetLogsResponseInnerQueries { public static final String SERIALIZED_NAME_INDEX_NAME = "index_name"; @@ -39,8 +29,9 @@ public GetLogsResponseInnerQueries indexName(String indexName) { /** * Index targeted by the query. + * * @return indexName - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Index targeted by the query.") public String getIndexName() { @@ -58,8 +49,9 @@ public GetLogsResponseInnerQueries userToken(String userToken) { /** * User identifier. + * * @return userToken - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "User identifier.") public String getUserToken() { @@ -77,8 +69,9 @@ public GetLogsResponseInnerQueries queryId(String queryId) { /** * QueryID for the given query. + * * @return queryId - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "QueryID for the given query.") public String getQueryId() { @@ -128,8 +121,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 b1bbcc74cc3..4edffb2515f 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,23 +1,12 @@ package com.algolia.model; -import com.algolia.model.GetLogsResponseInnerQueries; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * GetLogsResponseLogs - */ - +/** GetLogsResponseLogs */ public class GetLogsResponseLogs { public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; @@ -103,8 +92,9 @@ public GetLogsResponseLogs timestamp(String timestamp) { /** * Timestamp in ISO-8601 format. + * * @return timestamp - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Timestamp in ISO-8601 format.") public String getTimestamp() { @@ -122,8 +112,9 @@ public GetLogsResponseLogs method(String method) { /** * HTTP method of the perfomed request. + * * @return method - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -144,8 +135,9 @@ public GetLogsResponseLogs answerCode(String answerCode) { /** * HTTP response code. + * * @return answerCode - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "HTTP response code.") public String getAnswerCode() { @@ -163,8 +155,9 @@ public GetLogsResponseLogs queryBody(String queryBody) { /** * Request body. Truncated after 1000 characters. + * * @return queryBody - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -185,8 +178,9 @@ public GetLogsResponseLogs answer(String answer) { /** * Answer body. Truncated after 1000 characters. + * * @return answer - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -207,8 +201,9 @@ public GetLogsResponseLogs url(String url) { /** * Request URL. + * * @return url - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Request URL.") public String getUrl() { @@ -226,8 +221,9 @@ public GetLogsResponseLogs ip(String ip) { /** * IP of the client which perfomed the request. + * * @return ip - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -248,8 +244,9 @@ public GetLogsResponseLogs queryHeaders(String queryHeaders) { /** * Request Headers (API Key is obfuscated). + * * @return queryHeaders - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -270,8 +267,9 @@ public GetLogsResponseLogs sha1(String sha1) { /** * SHA1 signature of the log entry. + * * @return sha1 - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "SHA1 signature of the log entry.") public String getSha1() { @@ -289,8 +287,9 @@ public GetLogsResponseLogs nbApiCalls(String nbApiCalls) { /** * Number of API calls. + * * @return nbApiCalls - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Number of API calls.") public String getNbApiCalls() { @@ -308,8 +307,9 @@ public GetLogsResponseLogs processingTimeMs(String processingTimeMs) { /** * Processing time for the query. It doesn't include network time. + * * @return processingTimeMs - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -330,8 +330,9 @@ public GetLogsResponseLogs index(String index) { /** * Index targeted by the query. + * * @return index - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Index targeted by the query.") public String getIndex() { @@ -349,8 +350,9 @@ public GetLogsResponseLogs queryParams(String queryParams) { /** * Query parameters sent with the request. + * * @return queryParams - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Query parameters sent with the request.") public String getQueryParams() { @@ -368,8 +370,9 @@ public GetLogsResponseLogs queryNbHits(String queryNbHits) { /** * Number of hits returned for the query. + * * @return queryNbHits - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Number of hits returned for the query.") public String getQueryNbHits() { @@ -399,8 +402,9 @@ public GetLogsResponseLogs addInnerQueriesItem( /** * Array of all performed queries for the given request. + * * @return innerQueries - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Array of all performed queries for the given request." @@ -516,8 +520,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 c8f4da866ac..4335d762688 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,21 +5,14 @@ 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.Arrays; import java.util.Objects; -/** - * GetTaskResponse - */ - +/** GetTaskResponse */ public class GetTaskResponse { - /** - * Gets or Sets status - */ + /** Gets or Sets status */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { PUBLISHED("published"), @@ -80,8 +73,9 @@ public GetTaskResponse status(StatusEnum status) { /** * Get status + * * @return status - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "") public StatusEnum getStatus() { @@ -119,8 +113,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 cf4a3182766..eb85a7a0f4f 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,23 +1,14 @@ package com.algolia.model; -import com.algolia.model.UserId; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Map; import java.util.Objects; -/** - * Array of userIDs and clusters. - */ +/** Array of userIDs and clusters. */ @ApiModel(description = "Array of userIDs and clusters.") public class GetTopUserIdsResponse { @@ -42,8 +33,9 @@ public GetTopUserIdsResponse addTopUsersItem( /** * Mapping of cluster names to top users. + * * @return topUsers - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -84,8 +76,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HasPendingMappingsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HasPendingMappingsResponse.java index d58cc91d13e..fa849127169 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HasPendingMappingsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/HasPendingMappingsResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * HasPendingMappingsResponse - */ - +/** HasPendingMappingsResponse */ public class HasPendingMappingsResponse { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -30,8 +20,9 @@ public HasPendingMappingsResponse createdAt(OffsetDateTime createdAt) { /** * Date of creation (ISO-8601 format). + * * @return createdAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -75,8 +66,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 263ebc8b49c..7bb3d2dbbee 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,18 +5,13 @@ 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.Arrays; import java.util.List; import java.util.Objects; -/** - * HighlightResult - */ - +/** HighlightResult */ public class HighlightResult { public static final String SERIALIZED_NAME_VALUE = "value"; @@ -24,9 +19,7 @@ public class HighlightResult { @SerializedName(SERIALIZED_NAME_VALUE) private String value; - /** - * Indicates how well the attribute matched the search query. - */ + /** Indicates how well the attribute matched the search query. */ @JsonAdapter(MatchLevelEnum.Adapter.class) public enum MatchLevelEnum { NONE("none"), @@ -101,8 +94,9 @@ public HighlightResult value(String value) { /** * Markup text with occurrences highlighted. + * * @return value - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "George Clooney", @@ -123,8 +117,9 @@ public HighlightResult matchLevel(MatchLevelEnum matchLevel) { /** * Indicates how well the attribute matched the search query. + * * @return matchLevel - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Indicates how well the attribute matched the search query." @@ -152,8 +147,9 @@ public HighlightResult addMatchedWordsItem(String matchedWordsItem) { /** * List of words from the query that matched the object. + * * @return matchedWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of words from the query that matched the object." @@ -173,8 +169,9 @@ public HighlightResult fullyHighlighted(Boolean fullyHighlighted) { /** * Whether the entire attribute value is highlighted. + * * @return fullyHighlighted - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether the entire attribute value is highlighted." @@ -231,8 +228,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 5f35cd4e2e1..9f28608505e 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,23 +1,13 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; -/** - * Index - */ - +/** Index */ public class Index { public static final String SERIALIZED_NAME_NAME = "name"; @@ -84,8 +74,9 @@ public Index name(String name) { /** * Index name. + * * @return name - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Index name.") public String getName() { @@ -103,8 +94,9 @@ public Index createdAt(OffsetDateTime createdAt) { /** * Index creation date. An empty string means that the index has no records. + * * @return createdAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -125,8 +117,9 @@ public Index updatedAt(OffsetDateTime updatedAt) { /** * Date of last update (ISO-8601 format). + * * @return updatedAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -147,8 +140,9 @@ public Index entries(Integer entries) { /** * Number of records contained in the index. + * * @return entries - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -169,8 +163,9 @@ public Index dataSize(Integer dataSize) { /** * Number of bytes of the index in minified format. + * * @return dataSize - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -191,8 +186,9 @@ public Index fileSize(Integer fileSize) { /** * Number of bytes of the index binary file. + * * @return fileSize - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -213,8 +209,9 @@ public Index lastBuildTimeS(Integer lastBuildTimeS) { /** * Last build time + * * @return lastBuildTimeS - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Last build time") public Integer getLastBuildTimeS() { @@ -232,8 +229,9 @@ public Index numberOfPendingTask(Integer numberOfPendingTask) { /** * Number of pending indexing operations. This value is deprecated and should not be used. + * * @return numberOfPendingTask - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Number of pending indexing operations. This value is deprecated and should not be used." @@ -252,13 +250,16 @@ public Index pendingTask(Boolean pendingTask) { } /** - * A boolean which says whether the index has pending tasks. This value is deprecated and should not be used. + * A boolean which says whether the index has pending tasks. This value is deprecated and should + * not be used. + * * @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." + 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; @@ -275,8 +276,9 @@ public Index primary(String primary) { /** * Only present if the index is a replica. Contains the name of the related primary index. + * * @return primary - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Only present if the index is a replica. Contains the name of the related primary index." @@ -303,12 +305,15 @@ public Index addReplicasItem(String replicasItem) { } /** - * Only present if the index is a primary index with replicas. Contains the names of all linked replicas. + * Only present if the index is a primary index with replicas. Contains the names of all linked + * replicas. + * * @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." + value = "Only present if the index is a primary index with replicas. Contains the names of all" + + " linked replicas." ) public List getReplicas() { return replicas; @@ -394,8 +399,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 82a3508275d..5b043ad11c5 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 @@ -1,7 +1,5 @@ package com.algolia.model; -import com.algolia.model.BaseIndexSettings; -import com.algolia.model.IndexSettingsAsSearchParams; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -11,15 +9,12 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -/** - * The Algolia index settings. - */ +/** The Algolia index settings. */ @ApiModel(description = "The Algolia index settings.") public class IndexSettings { @@ -190,9 +185,7 @@ public class IndexSettings { @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS) private Integer minWordSizefor2Typos = 8; - /** - * Controls whether typo tolerance is enabled and how it is applied. - */ + /** Controls whether typo tolerance is enabled and how it is applied. */ @JsonAdapter(TypoToleranceEnum.Adapter.class) public enum TypoToleranceEnum { TRUE("true"), @@ -308,9 +301,7 @@ public TypoToleranceEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_ENABLE_PERSONALIZATION) private Boolean enablePersonalization = false; - /** - * Controls if and how query words are interpreted as prefixes. - */ + /** Controls if and how query words are interpreted as prefixes. */ @JsonAdapter(QueryTypeEnum.Adapter.class) public enum QueryTypeEnum { PREFIXLAST("prefixLast"), @@ -367,9 +358,7 @@ public QueryTypeEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_QUERY_TYPE) private QueryTypeEnum queryType = QueryTypeEnum.PREFIXLAST; - /** - * Selects a strategy to remove words from the query when it doesn’t match any hits. - */ + /** Selects a strategy to remove words from the query when it doesn’t match any hits. */ @JsonAdapter(RemoveWordsIfNoResultsEnum.Adapter.class) public enum RemoveWordsIfNoResultsEnum { NONE("none"), @@ -447,9 +436,7 @@ public RemoveWordsIfNoResultsEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES) private List disableExactOnAttributes = null; - /** - * Controls how the exact ranking criterion is computed when the query contains only one word. - */ + /** Controls how the exact ranking criterion is computed when the query contains only one word. */ @JsonAdapter(ExactOnSingleWordQueryEnum.Adapter.class) public enum ExactOnSingleWordQueryEnum { ATTRIBUTE("attribute"), @@ -509,9 +496,7 @@ public ExactOnSingleWordQueryEnum read(final JsonReader jsonReader) private ExactOnSingleWordQueryEnum exactOnSingleWordQuery = ExactOnSingleWordQueryEnum.ATTRIBUTE; - /** - * Gets or Sets alternativesAsExact - */ + /** Gets or Sets alternativesAsExact */ @JsonAdapter(AlternativesAsExactEnum.Adapter.class) public enum AlternativesAsExactEnum { IGNOREPLURALS("ignorePlurals"), @@ -569,9 +554,7 @@ public AlternativesAsExactEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_ALTERNATIVES_AS_EXACT) private List alternativesAsExact = null; - /** - * Gets or Sets advancedSyntaxFeatures - */ + /** Gets or Sets advancedSyntaxFeatures */ @JsonAdapter(AdvancedSyntaxFeaturesEnum.Adapter.class) public enum AdvancedSyntaxFeaturesEnum { EXACTPHRASE("exactPhrase"), @@ -686,8 +669,9 @@ public IndexSettings addReplicasItem(String replicasItem) { /** * Creates replicas, exact copies of an index. + * * @return replicas - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Creates replicas, exact copies of an index.") public List getReplicas() { @@ -705,8 +689,9 @@ public IndexSettings paginationLimitedTo(Integer paginationLimitedTo) { /** * Set the maximum number of hits accessible via pagination. + * * @return paginationLimitedTo - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Set the maximum number of hits accessible via pagination." @@ -738,8 +723,9 @@ public IndexSettings addDisableTypoToleranceOnWordsItem( /** * A list of words for which you want to turn off typo tolerance. + * * @return disableTypoToleranceOnWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "A list of words for which you want to turn off typo tolerance." @@ -773,8 +759,9 @@ public IndexSettings addAttributesToTransliterateItem( /** * Specify on which attributes to apply transliteration. + * * @return attributesToTransliterate - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Specify on which attributes to apply transliteration." @@ -806,8 +793,9 @@ public IndexSettings addCamelCaseAttributesItem( /** * List of attributes on which to do a decomposition of camel case words. + * * @return camelCaseAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which to do a decomposition of camel case words." @@ -839,12 +827,15 @@ public IndexSettings putDecompoundedAttributesItem( } /** - * Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding. + * Specify on which attributes in your index Algolia should apply word segmentation, also known as + * decompounding. + * * @return decompoundedAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding." + value = "Specify on which attributes in your index Algolia should apply word segmentation, also" + + " known as decompounding." ) public Map getDecompoundedAttributes() { return decompoundedAttributes; @@ -870,12 +861,15 @@ public IndexSettings addIndexLanguagesItem(String indexLanguagesItem) { } /** - * Sets the languages at the index level for language-specific processing such as tokenization and normalization. + * Sets the languages at the index level for language-specific processing such as tokenization and + * normalization. + * * @return indexLanguages - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Sets the languages at the index level for language-specific processing such as tokenization and normalization." + value = "Sets the languages at the index level for language-specific processing such as" + + " tokenization and normalization." ) public List getIndexLanguages() { return indexLanguages; @@ -891,12 +885,15 @@ public IndexSettings filterPromotes(Boolean filterPromotes) { } /** - * Whether promoted results should match the filters of the current search, except for geographic filters. + * Whether promoted results should match the filters of the current search, except for geographic + * filters. + * * @return filterPromotes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Whether promoted results should match the filters of the current search, except for geographic filters." + value = "Whether promoted results should match the filters of the current search, except for" + + " geographic filters." ) public Boolean getFilterPromotes() { return filterPromotes; @@ -925,8 +922,9 @@ public IndexSettings addDisablePrefixOnAttributesItem( /** * List of attributes on which you want to disable prefix matching. + * * @return disablePrefixOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable prefix matching." @@ -950,8 +948,9 @@ public IndexSettings allowCompressionOfIntegerArray( /** * Enables compression of large integer arrays. + * * @return allowCompressionOfIntegerArray - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables compression of large integer arrays.") public Boolean getAllowCompressionOfIntegerArray() { @@ -983,8 +982,9 @@ public IndexSettings addNumericAttributesForFilteringItem( /** * List of numeric attributes that can be used as numerical filters. + * * @return numericAttributesForFiltering - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of numeric attributes that can be used as numerical filters." @@ -1014,8 +1014,9 @@ public IndexSettings putUserDataItem(String key, Object userDataItem) { /** * Lets you store custom data in your indices. + * * @return userData - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { @@ -1043,8 +1044,9 @@ public IndexSettings addSearchableAttributesItem( /** * The complete list of attributes used for searching. + * * @return searchableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The complete list of attributes used for searching." @@ -1076,8 +1078,9 @@ public IndexSettings addAttributesForFacetingItem( /** * The complete list of attributes that will be used for faceting. + * * @return attributesForFaceting - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The complete list of attributes that will be used for faceting." @@ -1109,8 +1112,9 @@ public IndexSettings addUnretrievableAttributesItem( /** * List of attributes that can’t be retrieved at query time. + * * @return unretrievableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes that can’t be retrieved at query time." @@ -1140,8 +1144,9 @@ public IndexSettings addAttributesToRetrieveItem( /** * This parameter controls which attributes to retrieve and which not to retrieve. + * * @return attributesToRetrieve - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "This parameter controls which attributes to retrieve and which not to retrieve." @@ -1173,8 +1178,9 @@ public IndexSettings addRestrictSearchableAttributesItem( /** * Restricts a given query to look in only a subset of your searchable attributes. + * * @return restrictSearchableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Restricts a given query to look in only a subset of your searchable attributes." @@ -1204,8 +1210,9 @@ public IndexSettings addRankingItem(String rankingItem) { /** * Controls how Algolia should sort your results. + * * @return ranking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Controls how Algolia should sort your results.") public List getRanking() { @@ -1231,8 +1238,9 @@ public IndexSettings addCustomRankingItem(String customRankingItem) { /** * Specifies the custom ranking criterion. + * * @return customRanking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specifies the custom ranking criterion.") public List getCustomRanking() { @@ -1249,12 +1257,15 @@ public IndexSettings relevancyStrictness(Integer relevancyStrictness) { } /** - * Controls the relevancy threshold below which less relevant results aren’t included in the results. + * Controls the relevancy threshold below which less relevant results aren’t included in the + * results. + * * @return relevancyStrictness - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Controls the relevancy threshold below which less relevant results aren’t included in the results." + value = "Controls the relevancy threshold below which less relevant results aren’t included in" + + " the results." ) public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -1283,8 +1294,9 @@ public IndexSettings addAttributesToHighlightItem( /** * List of attributes to highlight. + * * @return attributesToHighlight - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "List of attributes to highlight.") public List getAttributesToHighlight() { @@ -1312,8 +1324,9 @@ public IndexSettings addAttributesToSnippetItem( /** * List of attributes to snippet, with an optional maximum number of words to snippet. + * * @return attributesToSnippet - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes to snippet, with an optional maximum number of words to snippet." @@ -1333,11 +1346,13 @@ public IndexSettings highlightPreTag(String highlightPreTag) { /** * The HTML string to insert before the highlighted parts in all highlight and snippet results. + * * @return highlightPreTag - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The HTML string to insert before the highlighted parts in all highlight and snippet results." + value = "The HTML string to insert before the highlighted parts in all highlight and snippet" + + " results." ) public String getHighlightPreTag() { return highlightPreTag; @@ -1354,11 +1369,13 @@ public IndexSettings highlightPostTag(String highlightPostTag) { /** * The HTML string to insert after the highlighted parts in all highlight and snippet results. + * * @return highlightPostTag - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The HTML string to insert after the highlighted parts in all highlight and snippet results." + value = "The HTML string to insert after the highlighted parts in all highlight and snippet" + + " results." ) public String getHighlightPostTag() { return highlightPostTag; @@ -1375,8 +1392,9 @@ public IndexSettings snippetEllipsisText(String snippetEllipsisText) { /** * String used as an ellipsis indicator when a snippet is truncated. + * * @return snippetEllipsisText - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "String used as an ellipsis indicator when a snippet is truncated." @@ -1398,8 +1416,9 @@ public IndexSettings restrictHighlightAndSnippetArrays( /** * Restrict highlighting and snippeting to items that matched the query. + * * @return restrictHighlightAndSnippetArrays - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Restrict highlighting and snippeting to items that matched the query." @@ -1421,8 +1440,9 @@ public IndexSettings hitsPerPage(Integer hitsPerPage) { /** * Set the number of hits per page. + * * @return hitsPerPage - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { @@ -1439,12 +1459,15 @@ public IndexSettings minWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * Minimum number of characters a word in the query string must contain to accept matches with 1 + * typo. + * * @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." + value = "Minimum number of characters a word in the query string must contain to accept matches" + + " with 1 typo." ) public Integer getMinWordSizefor1Typo() { return minWordSizefor1Typo; @@ -1460,12 +1483,15 @@ public IndexSettings minWordSizefor2Typos(Integer minWordSizefor2Typos) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * Minimum number of characters a word in the query string must contain to accept matches with 2 + * typos. + * * @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." + value = "Minimum number of characters a word in the query string must contain to accept matches" + + " with 2 typos." ) public Integer getMinWordSizefor2Typos() { return minWordSizefor2Typos; @@ -1482,8 +1508,9 @@ public IndexSettings typoTolerance(TypoToleranceEnum typoTolerance) { /** * Controls whether typo tolerance is enabled and how it is applied. + * * @return typoTolerance - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Controls whether typo tolerance is enabled and how it is applied." @@ -1505,8 +1532,9 @@ public IndexSettings allowTyposOnNumericTokens( /** * Whether to allow typos on numbers (“numeric tokens”) in the query string. + * * @return allowTyposOnNumericTokens - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to allow typos on numbers (“numeric tokens”) in the query string." @@ -1540,8 +1568,9 @@ public IndexSettings addDisableTypoToleranceOnAttributesItem( /** * List of attributes on which you want to disable typo tolerance. + * * @return disableTypoToleranceOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable typo tolerance." @@ -1563,8 +1592,9 @@ public IndexSettings separatorsToIndex(String separatorsToIndex) { /** * Control which separators are indexed. + * * @return separatorsToIndex - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Control which separators are indexed.") public String getSeparatorsToIndex() { @@ -1582,8 +1612,9 @@ public IndexSettings ignorePlurals(String ignorePlurals) { /** * Treats singular, plurals, and other forms of declensions as matching terms. + * * @return ignorePlurals - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Treats singular, plurals, and other forms of declensions as matching terms." @@ -1603,8 +1634,9 @@ public IndexSettings removeStopWords(String removeStopWords) { /** * Removes stop (common) words from the query before executing it. + * * @return removeStopWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Removes stop (common) words from the query before executing it." @@ -1626,8 +1658,9 @@ public IndexSettings keepDiacriticsOnCharacters( /** * List of characters that the engine shouldn’t automatically normalize. + * * @return keepDiacriticsOnCharacters - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of characters that the engine shouldn’t automatically normalize." @@ -1654,12 +1687,15 @@ public IndexSettings addQueryLanguagesItem(String queryLanguagesItem) { } /** - * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * Sets the languages to be used by language-specific settings and functionalities such as + * ignorePlurals, removeStopWords, and CJK word-detection. + * * @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." + 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; @@ -1676,8 +1712,9 @@ public IndexSettings decompoundQuery(Boolean decompoundQuery) { /** * Splits compound words into their composing atoms in the query. + * * @return decompoundQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Splits compound words into their composing atoms in the query." @@ -1697,8 +1734,9 @@ public IndexSettings enableRules(Boolean enableRules) { /** * Whether Rules should be globally enabled. + * * @return enableRules - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Whether Rules should be globally enabled.") public Boolean getEnableRules() { @@ -1716,8 +1754,9 @@ public IndexSettings enablePersonalization(Boolean enablePersonalization) { /** * Enable the Personalization feature. + * * @return enablePersonalization - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enable the Personalization feature.") public Boolean getEnablePersonalization() { @@ -1735,8 +1774,9 @@ public IndexSettings queryType(QueryTypeEnum queryType) { /** * Controls if and how query words are interpreted as prefixes. + * * @return queryType - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Controls if and how query words are interpreted as prefixes." @@ -1758,8 +1798,9 @@ public IndexSettings removeWordsIfNoResults( /** * Selects a strategy to remove words from the query when it doesn’t match any hits. + * * @return removeWordsIfNoResults - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Selects a strategy to remove words from the query when it doesn’t match any hits." @@ -1781,8 +1822,9 @@ public IndexSettings advancedSyntax(Boolean advancedSyntax) { /** * Enables the advanced query syntax. + * * @return advancedSyntax - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables the advanced query syntax.") public Boolean getAdvancedSyntax() { @@ -1808,8 +1850,9 @@ public IndexSettings addOptionalWordsItem(String optionalWordsItem) { /** * A list of words that should be considered as optional when found in the query. + * * @return optionalWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "A list of words that should be considered as optional when found in the query." @@ -1841,8 +1884,9 @@ public IndexSettings addDisableExactOnAttributesItem( /** * List of attributes on which you want to disable the exact ranking criterion. + * * @return disableExactOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable the exact ranking criterion." @@ -1866,11 +1910,13 @@ public IndexSettings exactOnSingleWordQuery( /** * Controls how the exact ranking criterion is computed when the query contains only one word. + * * @return exactOnSingleWordQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Controls how the exact ranking criterion is computed when the query contains only one word." + value = "Controls how the exact ranking criterion is computed when the query contains only one" + + " word." ) public ExactOnSingleWordQueryEnum getExactOnSingleWordQuery() { return exactOnSingleWordQuery; @@ -1901,11 +1947,13 @@ public IndexSettings addAlternativesAsExactItem( /** * List of alternatives that should be considered an exact match by the exact ranking criterion. + * * @return alternativesAsExact - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "List of alternatives that should be considered an exact match by the exact ranking criterion." + value = "List of alternatives that should be considered an exact match by the exact ranking" + + " criterion." ) public List getAlternativesAsExact() { return alternativesAsExact; @@ -1935,12 +1983,15 @@ public IndexSettings addAdvancedSyntaxFeaturesItem( } /** - * Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled. + * Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is + * enabled. + * * @return advancedSyntaxFeatures - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled." + value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is" + + " enabled." ) public List getAdvancedSyntaxFeatures() { return advancedSyntaxFeatures; @@ -1958,11 +2009,10 @@ public IndexSettings distinct(Integer distinct) { } /** - * Enables de-duplication or grouping of results. - * minimum: 0 - * maximum: 4 + * Enables de-duplication or grouping of results. minimum: 0 maximum: 4 + * * @return distinct - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables de-duplication or grouping of results.") public Integer getDistinct() { @@ -1980,8 +2030,9 @@ public IndexSettings synonyms(Boolean synonyms) { /** * Whether to take into account an index’s synonyms for a particular search. + * * @return synonyms - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to take into account an index’s synonyms for a particular search." @@ -2002,12 +2053,15 @@ public IndexSettings replaceSynonymsInHighlight( } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to highlight and snippet the original word that matches the synonym or the synonym + * itself. + * * @return replaceSynonymsInHighlight - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Whether to highlight and snippet the original word that matches the synonym or the synonym itself." + value = "Whether to highlight and snippet the original word that matches the synonym or the" + + " synonym itself." ) public Boolean getReplaceSynonymsInHighlight() { return replaceSynonymsInHighlight; @@ -2025,11 +2079,10 @@ public IndexSettings minProximity(Integer minProximity) { } /** - * Precision of the proximity ranking criterion. - * minimum: 1 - * maximum: 7 + * Precision of the proximity ranking criterion. minimum: 1 maximum: 7 + * * @return minProximity - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Precision of the proximity ranking criterion.") public Integer getMinProximity() { @@ -2054,12 +2107,15 @@ public IndexSettings addResponseFieldsItem(String responseFieldsItem) { } /** - * Choose which fields to return in the API response. This parameters applies to search and browse queries. + * Choose which fields to return in the API response. This parameters applies to search and browse + * queries. + * * @return responseFields - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Choose which fields to return in the API response. This parameters applies to search and browse queries." + value = "Choose which fields to return in the API response. This parameters applies to search and" + + " browse queries." ) public List getResponseFields() { return responseFields; @@ -2076,8 +2132,9 @@ public IndexSettings maxFacetHits(Integer maxFacetHits) { /** * Maximum number of facet hits to return during a search for facet values. + * * @return maxFacetHits - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Maximum number of facet hits to return during a search for facet values." @@ -2099,12 +2156,15 @@ public IndexSettings attributeCriteriaComputedByMinProximity( } /** - * 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. + * 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. + * * @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." + 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; @@ -2123,12 +2183,15 @@ public IndexSettings renderingContent(Object renderingContent) { } /** - * 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. + * 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. + * * @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." + 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; @@ -2580,8 +2643,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 e7f52143788..88e9177b84f 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,18 +5,13 @@ 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.Arrays; import java.util.List; import java.util.Objects; -/** - * IndexSettingsAsSearchParams - */ - +/** IndexSettingsAsSearchParams */ public class IndexSettingsAsSearchParams { public static final String SERIALIZED_NAME_SEARCHABLE_ATTRIBUTES = @@ -118,9 +113,7 @@ public class IndexSettingsAsSearchParams { @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS) private Integer minWordSizefor2Typos = 8; - /** - * Controls whether typo tolerance is enabled and how it is applied. - */ + /** Controls whether typo tolerance is enabled and how it is applied. */ @JsonAdapter(TypoToleranceEnum.Adapter.class) public enum TypoToleranceEnum { TRUE("true"), @@ -236,9 +229,7 @@ public TypoToleranceEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_ENABLE_PERSONALIZATION) private Boolean enablePersonalization = false; - /** - * Controls if and how query words are interpreted as prefixes. - */ + /** Controls if and how query words are interpreted as prefixes. */ @JsonAdapter(QueryTypeEnum.Adapter.class) public enum QueryTypeEnum { PREFIXLAST("prefixLast"), @@ -295,9 +286,7 @@ public QueryTypeEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_QUERY_TYPE) private QueryTypeEnum queryType = QueryTypeEnum.PREFIXLAST; - /** - * Selects a strategy to remove words from the query when it doesn’t match any hits. - */ + /** Selects a strategy to remove words from the query when it doesn’t match any hits. */ @JsonAdapter(RemoveWordsIfNoResultsEnum.Adapter.class) public enum RemoveWordsIfNoResultsEnum { NONE("none"), @@ -375,9 +364,7 @@ public RemoveWordsIfNoResultsEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES) private List disableExactOnAttributes = null; - /** - * Controls how the exact ranking criterion is computed when the query contains only one word. - */ + /** Controls how the exact ranking criterion is computed when the query contains only one word. */ @JsonAdapter(ExactOnSingleWordQueryEnum.Adapter.class) public enum ExactOnSingleWordQueryEnum { ATTRIBUTE("attribute"), @@ -437,9 +424,7 @@ public ExactOnSingleWordQueryEnum read(final JsonReader jsonReader) private ExactOnSingleWordQueryEnum exactOnSingleWordQuery = ExactOnSingleWordQueryEnum.ATTRIBUTE; - /** - * Gets or Sets alternativesAsExact - */ + /** Gets or Sets alternativesAsExact */ @JsonAdapter(AlternativesAsExactEnum.Adapter.class) public enum AlternativesAsExactEnum { IGNOREPLURALS("ignorePlurals"), @@ -497,9 +482,7 @@ public AlternativesAsExactEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_ALTERNATIVES_AS_EXACT) private List alternativesAsExact = null; - /** - * Gets or Sets advancedSyntaxFeatures - */ + /** Gets or Sets advancedSyntaxFeatures */ @JsonAdapter(AdvancedSyntaxFeaturesEnum.Adapter.class) public enum AdvancedSyntaxFeaturesEnum { EXACTPHRASE("exactPhrase"), @@ -618,8 +601,9 @@ public IndexSettingsAsSearchParams addSearchableAttributesItem( /** * The complete list of attributes used for searching. + * * @return searchableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The complete list of attributes used for searching." @@ -651,8 +635,9 @@ public IndexSettingsAsSearchParams addAttributesForFacetingItem( /** * The complete list of attributes that will be used for faceting. + * * @return attributesForFaceting - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The complete list of attributes that will be used for faceting." @@ -684,8 +669,9 @@ public IndexSettingsAsSearchParams addUnretrievableAttributesItem( /** * List of attributes that can’t be retrieved at query time. + * * @return unretrievableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes that can’t be retrieved at query time." @@ -717,8 +703,9 @@ public IndexSettingsAsSearchParams addAttributesToRetrieveItem( /** * This parameter controls which attributes to retrieve and which not to retrieve. + * * @return attributesToRetrieve - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "This parameter controls which attributes to retrieve and which not to retrieve." @@ -750,8 +737,9 @@ public IndexSettingsAsSearchParams addRestrictSearchableAttributesItem( /** * Restricts a given query to look in only a subset of your searchable attributes. + * * @return restrictSearchableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Restricts a given query to look in only a subset of your searchable attributes." @@ -781,8 +769,9 @@ public IndexSettingsAsSearchParams addRankingItem(String rankingItem) { /** * Controls how Algolia should sort your results. + * * @return ranking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Controls how Algolia should sort your results.") public List getRanking() { @@ -810,8 +799,9 @@ public IndexSettingsAsSearchParams addCustomRankingItem( /** * Specifies the custom ranking criterion. + * * @return customRanking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specifies the custom ranking criterion.") public List getCustomRanking() { @@ -830,12 +820,15 @@ public IndexSettingsAsSearchParams relevancyStrictness( } /** - * Controls the relevancy threshold below which less relevant results aren’t included in the results. + * Controls the relevancy threshold below which less relevant results aren’t included in the + * results. + * * @return relevancyStrictness - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Controls the relevancy threshold below which less relevant results aren’t included in the results." + value = "Controls the relevancy threshold below which less relevant results aren’t included in" + + " the results." ) public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -864,8 +857,9 @@ public IndexSettingsAsSearchParams addAttributesToHighlightItem( /** * List of attributes to highlight. + * * @return attributesToHighlight - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "List of attributes to highlight.") public List getAttributesToHighlight() { @@ -895,8 +889,9 @@ public IndexSettingsAsSearchParams addAttributesToSnippetItem( /** * List of attributes to snippet, with an optional maximum number of words to snippet. + * * @return attributesToSnippet - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes to snippet, with an optional maximum number of words to snippet." @@ -916,11 +911,13 @@ public IndexSettingsAsSearchParams highlightPreTag(String highlightPreTag) { /** * The HTML string to insert before the highlighted parts in all highlight and snippet results. + * * @return highlightPreTag - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The HTML string to insert before the highlighted parts in all highlight and snippet results." + value = "The HTML string to insert before the highlighted parts in all highlight and snippet" + + " results." ) public String getHighlightPreTag() { return highlightPreTag; @@ -937,11 +934,13 @@ public IndexSettingsAsSearchParams highlightPostTag(String highlightPostTag) { /** * The HTML string to insert after the highlighted parts in all highlight and snippet results. + * * @return highlightPostTag - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The HTML string to insert after the highlighted parts in all highlight and snippet results." + value = "The HTML string to insert after the highlighted parts in all highlight and snippet" + + " results." ) public String getHighlightPostTag() { return highlightPostTag; @@ -960,8 +959,9 @@ public IndexSettingsAsSearchParams snippetEllipsisText( /** * String used as an ellipsis indicator when a snippet is truncated. + * * @return snippetEllipsisText - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "String used as an ellipsis indicator when a snippet is truncated." @@ -983,8 +983,9 @@ public IndexSettingsAsSearchParams restrictHighlightAndSnippetArrays( /** * Restrict highlighting and snippeting to items that matched the query. + * * @return restrictHighlightAndSnippetArrays - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Restrict highlighting and snippeting to items that matched the query." @@ -1006,8 +1007,9 @@ public IndexSettingsAsSearchParams hitsPerPage(Integer hitsPerPage) { /** * Set the number of hits per page. + * * @return hitsPerPage - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { @@ -1026,12 +1028,15 @@ public IndexSettingsAsSearchParams minWordSizefor1Typo( } /** - * Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * Minimum number of characters a word in the query string must contain to accept matches with 1 + * typo. + * * @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." + value = "Minimum number of characters a word in the query string must contain to accept matches" + + " with 1 typo." ) public Integer getMinWordSizefor1Typo() { return minWordSizefor1Typo; @@ -1049,12 +1054,15 @@ public IndexSettingsAsSearchParams minWordSizefor2Typos( } /** - * Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * Minimum number of characters a word in the query string must contain to accept matches with 2 + * typos. + * * @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." + value = "Minimum number of characters a word in the query string must contain to accept matches" + + " with 2 typos." ) public Integer getMinWordSizefor2Typos() { return minWordSizefor2Typos; @@ -1073,8 +1081,9 @@ public IndexSettingsAsSearchParams typoTolerance( /** * Controls whether typo tolerance is enabled and how it is applied. + * * @return typoTolerance - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Controls whether typo tolerance is enabled and how it is applied." @@ -1096,8 +1105,9 @@ public IndexSettingsAsSearchParams allowTyposOnNumericTokens( /** * Whether to allow typos on numbers (“numeric tokens”) in the query string. + * * @return allowTyposOnNumericTokens - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to allow typos on numbers (“numeric tokens”) in the query string." @@ -1131,8 +1141,9 @@ public IndexSettingsAsSearchParams addDisableTypoToleranceOnAttributesItem( /** * List of attributes on which you want to disable typo tolerance. + * * @return disableTypoToleranceOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable typo tolerance." @@ -1156,8 +1167,9 @@ public IndexSettingsAsSearchParams separatorsToIndex( /** * Control which separators are indexed. + * * @return separatorsToIndex - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Control which separators are indexed.") public String getSeparatorsToIndex() { @@ -1175,8 +1187,9 @@ public IndexSettingsAsSearchParams ignorePlurals(String ignorePlurals) { /** * Treats singular, plurals, and other forms of declensions as matching terms. + * * @return ignorePlurals - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Treats singular, plurals, and other forms of declensions as matching terms." @@ -1196,8 +1209,9 @@ public IndexSettingsAsSearchParams removeStopWords(String removeStopWords) { /** * Removes stop (common) words from the query before executing it. + * * @return removeStopWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Removes stop (common) words from the query before executing it." @@ -1219,8 +1233,9 @@ public IndexSettingsAsSearchParams keepDiacriticsOnCharacters( /** * List of characters that the engine shouldn’t automatically normalize. + * * @return keepDiacriticsOnCharacters - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of characters that the engine shouldn’t automatically normalize." @@ -1251,12 +1266,15 @@ public IndexSettingsAsSearchParams addQueryLanguagesItem( } /** - * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * Sets the languages to be used by language-specific settings and functionalities such as + * ignorePlurals, removeStopWords, and CJK word-detection. + * * @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." + 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; @@ -1273,8 +1291,9 @@ public IndexSettingsAsSearchParams decompoundQuery(Boolean decompoundQuery) { /** * Splits compound words into their composing atoms in the query. + * * @return decompoundQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Splits compound words into their composing atoms in the query." @@ -1294,8 +1313,9 @@ public IndexSettingsAsSearchParams enableRules(Boolean enableRules) { /** * Whether Rules should be globally enabled. + * * @return enableRules - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Whether Rules should be globally enabled.") public Boolean getEnableRules() { @@ -1315,8 +1335,9 @@ public IndexSettingsAsSearchParams enablePersonalization( /** * Enable the Personalization feature. + * * @return enablePersonalization - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enable the Personalization feature.") public Boolean getEnablePersonalization() { @@ -1334,8 +1355,9 @@ public IndexSettingsAsSearchParams queryType(QueryTypeEnum queryType) { /** * Controls if and how query words are interpreted as prefixes. + * * @return queryType - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Controls if and how query words are interpreted as prefixes." @@ -1357,8 +1379,9 @@ public IndexSettingsAsSearchParams removeWordsIfNoResults( /** * Selects a strategy to remove words from the query when it doesn’t match any hits. + * * @return removeWordsIfNoResults - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Selects a strategy to remove words from the query when it doesn’t match any hits." @@ -1380,8 +1403,9 @@ public IndexSettingsAsSearchParams advancedSyntax(Boolean advancedSyntax) { /** * Enables the advanced query syntax. + * * @return advancedSyntax - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables the advanced query syntax.") public Boolean getAdvancedSyntax() { @@ -1409,8 +1433,9 @@ public IndexSettingsAsSearchParams addOptionalWordsItem( /** * A list of words that should be considered as optional when found in the query. + * * @return optionalWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "A list of words that should be considered as optional when found in the query." @@ -1442,8 +1467,9 @@ public IndexSettingsAsSearchParams addDisableExactOnAttributesItem( /** * List of attributes on which you want to disable the exact ranking criterion. + * * @return disableExactOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable the exact ranking criterion." @@ -1467,11 +1493,13 @@ public IndexSettingsAsSearchParams exactOnSingleWordQuery( /** * Controls how the exact ranking criterion is computed when the query contains only one word. + * * @return exactOnSingleWordQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Controls how the exact ranking criterion is computed when the query contains only one word." + value = "Controls how the exact ranking criterion is computed when the query contains only one" + + " word." ) public ExactOnSingleWordQueryEnum getExactOnSingleWordQuery() { return exactOnSingleWordQuery; @@ -1502,11 +1530,13 @@ public IndexSettingsAsSearchParams addAlternativesAsExactItem( /** * List of alternatives that should be considered an exact match by the exact ranking criterion. + * * @return alternativesAsExact - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "List of alternatives that should be considered an exact match by the exact ranking criterion." + value = "List of alternatives that should be considered an exact match by the exact ranking" + + " criterion." ) public List getAlternativesAsExact() { return alternativesAsExact; @@ -1536,12 +1566,15 @@ public IndexSettingsAsSearchParams addAdvancedSyntaxFeaturesItem( } /** - * Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled. + * Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is + * enabled. + * * @return advancedSyntaxFeatures - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled." + value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is" + + " enabled." ) public List getAdvancedSyntaxFeatures() { return advancedSyntaxFeatures; @@ -1559,11 +1592,10 @@ public IndexSettingsAsSearchParams distinct(Integer distinct) { } /** - * Enables de-duplication or grouping of results. - * minimum: 0 - * maximum: 4 + * Enables de-duplication or grouping of results. minimum: 0 maximum: 4 + * * @return distinct - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables de-duplication or grouping of results.") public Integer getDistinct() { @@ -1581,8 +1613,9 @@ public IndexSettingsAsSearchParams synonyms(Boolean synonyms) { /** * Whether to take into account an index’s synonyms for a particular search. + * * @return synonyms - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to take into account an index’s synonyms for a particular search." @@ -1603,12 +1636,15 @@ public IndexSettingsAsSearchParams replaceSynonymsInHighlight( } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to highlight and snippet the original word that matches the synonym or the synonym + * itself. + * * @return replaceSynonymsInHighlight - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Whether to highlight and snippet the original word that matches the synonym or the synonym itself." + value = "Whether to highlight and snippet the original word that matches the synonym or the" + + " synonym itself." ) public Boolean getReplaceSynonymsInHighlight() { return replaceSynonymsInHighlight; @@ -1626,11 +1662,10 @@ public IndexSettingsAsSearchParams minProximity(Integer minProximity) { } /** - * Precision of the proximity ranking criterion. - * minimum: 1 - * maximum: 7 + * Precision of the proximity ranking criterion. minimum: 1 maximum: 7 + * * @return minProximity - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Precision of the proximity ranking criterion.") public Integer getMinProximity() { @@ -1659,12 +1694,15 @@ public IndexSettingsAsSearchParams addResponseFieldsItem( } /** - * Choose which fields to return in the API response. This parameters applies to search and browse queries. + * Choose which fields to return in the API response. This parameters applies to search and browse + * queries. + * * @return responseFields - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Choose which fields to return in the API response. This parameters applies to search and browse queries." + value = "Choose which fields to return in the API response. This parameters applies to search and" + + " browse queries." ) public List getResponseFields() { return responseFields; @@ -1681,8 +1719,9 @@ public IndexSettingsAsSearchParams maxFacetHits(Integer maxFacetHits) { /** * Maximum number of facet hits to return during a search for facet values. + * * @return maxFacetHits - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Maximum number of facet hits to return during a search for facet values." @@ -1704,12 +1743,15 @@ public IndexSettingsAsSearchParams attributeCriteriaComputedByMinProximity( } /** - * 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. + * 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. + * * @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." + 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; @@ -1728,12 +1770,15 @@ public IndexSettingsAsSearchParams renderingContent(Object renderingContent) { } /** - * 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. + * 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. + * * @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." + 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; @@ -2146,8 +2191,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 6bccdbb84e3..5794a2f7955 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,21 +1,13 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * Array of clusters. - */ +/** Array of clusters. */ @ApiModel(description = "Array of clusters.") public class ListClustersResponse { @@ -36,8 +28,9 @@ public ListClustersResponse addTopUsersItem(String topUsersItem) { /** * Mapping of cluster names to top users. + * * @return topUsers - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -78,8 +71,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 739b5930570..201e4d3634d 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,23 +1,12 @@ package com.algolia.model; -import com.algolia.model.Index; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * ListIndicesResponse - */ - +/** ListIndicesResponse */ public class ListIndicesResponse { public static final String SERIALIZED_NAME_ITEMS = "items"; @@ -45,8 +34,9 @@ public ListIndicesResponse addItemsItem(Index itemsItem) { /** * List of the fetched indices. + * * @return items - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "List of the fetched indices.") public List getItems() { @@ -64,8 +54,9 @@ public ListIndicesResponse nbPages(Integer nbPages) { /** * Number of pages. + * * @return nbPages - **/ + */ @javax.annotation.Nullable @ApiModelProperty(example = "100", value = "Number of pages.") public Integer getNbPages() { @@ -107,8 +98,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 c1470a5e4dd..0ba70e52e29 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,22 +1,13 @@ package com.algolia.model; -import com.algolia.model.UserId; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * UserIDs data. - */ +/** UserIDs data. */ @ApiModel(description = "UserIDs data.") public class ListUserIdsResponse { @@ -37,8 +28,9 @@ public ListUserIdsResponse addUserIDsItem(UserId userIDsItem) { /** * List of userIDs. + * * @return userIDs - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "List of userIDs.") public List getUserIDs() { @@ -76,8 +68,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 f8bf4c3152c..f7cd5d23f09 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,16 +5,11 @@ 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.Arrays; import java.util.Objects; -/** - * MultipleQueries - */ - +/** MultipleQueries */ public class MultipleQueries { public static final String SERIALIZED_NAME_INDEX_NAME = "indexName"; @@ -27,9 +22,7 @@ public class MultipleQueries { @SerializedName(SERIALIZED_NAME_QUERY) private String query = ""; - /** - * Perform a search query with `default`, will search for facet values if `facet` is given. - */ + /** Perform a search query with `default`, will search for facet values if `facet` is given. */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { DEFAULT("default"), @@ -100,8 +93,9 @@ public MultipleQueries indexName(String indexName) { /** * The Algolia index name. + * * @return indexName - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "products", @@ -123,8 +117,9 @@ public MultipleQueries query(String query) { /** * The text to search in the index. + * * @return query - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The text to search in the index.") public String getQuery() { @@ -142,11 +137,13 @@ public MultipleQueries type(TypeEnum type) { /** * Perform a search query with `default`, will search for facet values if `facet` is given. + * * @return type - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Perform a search query with `default`, will search for facet values if `facet` is given." + value = "Perform a search query with `default`, will search for facet values if `facet` is" + + " given." ) public TypeEnum getType() { return type; @@ -163,8 +160,9 @@ public MultipleQueries facet(String facet) { /** * The `facet` name. + * * @return facet - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The `facet` name.") public String getFacet() { @@ -182,8 +180,9 @@ public MultipleQueries params(String params) { /** * A query string of search parameters. + * * @return params - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "A query string of search parameters.") public String getParams() { @@ -234,8 +233,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 1a59201ef64..f799ac1ac0f 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 @@ -1,23 +1,17 @@ package com.algolia.model; -import com.algolia.model.MultipleQueries; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * MultipleQueriesObject - */ - +/** MultipleQueriesObject */ public class MultipleQueriesObject { public static final String SERIALIZED_NAME_REQUESTS = "requests"; @@ -25,9 +19,7 @@ public class MultipleQueriesObject { @SerializedName(SERIALIZED_NAME_REQUESTS) private List requests = new ArrayList<>(); - /** - * Gets or Sets strategy - */ + /** Gets or Sets strategy */ @JsonAdapter(StrategyEnum.Adapter.class) public enum StrategyEnum { NONE("none"), @@ -93,8 +85,9 @@ public MultipleQueriesObject addRequestsItem(MultipleQueries requestsItem) { /** * Get requests + * * @return requests - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "") public List getRequests() { @@ -112,8 +105,9 @@ public MultipleQueriesObject strategy(StrategyEnum strategy) { /** * Get strategy + * * @return strategy - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public StrategyEnum getStrategy() { @@ -155,8 +149,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 6b012247f13..c9818f862b3 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,23 +1,12 @@ package com.algolia.model; -import com.algolia.model.SearchResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * MultipleQueriesResponse - */ - +/** MultipleQueriesResponse */ public class MultipleQueriesResponse { public static final String SERIALIZED_NAME_RESULTS = "results"; @@ -40,8 +29,9 @@ public MultipleQueriesResponse addResultsItem(SearchResponse resultsItem) { /** * Get results + * * @return results - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public List getResults() { @@ -79,8 +69,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 a1bb4263c45..269dc3d26d9 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 @@ -5,24 +5,16 @@ 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.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; -/** - * Operation - */ - +/** Operation */ public class Operation { - /** - * type of operation. - */ + /** type of operation. */ @JsonAdapter(ActionEnum.Adapter.class) public enum ActionEnum { ADDOBJECT("addObject"), @@ -98,8 +90,9 @@ public Operation action(ActionEnum action) { /** * type of operation. + * * @return action - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "type of operation.") public ActionEnum getAction() { @@ -125,8 +118,9 @@ public Operation putBodyItem(String key, Object bodyItem) { /** * arguments to the operation (depends on the type of the operation). + * * @return body - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "arguments to the operation (depends on the type of the operation)." @@ -170,8 +164,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 2fe028d0003..c7bc64aa54d 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,23 +5,16 @@ 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.Arrays; import java.util.List; import java.util.Objects; -/** - * OperationIndexObject - */ - +/** OperationIndexObject */ public class OperationIndexObject { - /** - * Type of operation to perform (move or copy). - */ + /** Type of operation to perform (move or copy). */ @JsonAdapter(OperationEnum.Adapter.class) public enum OperationEnum { MOVE("move"), @@ -81,9 +74,7 @@ public OperationEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_DESTINATION) private String destination; - /** - * Gets or Sets scope - */ + /** Gets or Sets scope */ @JsonAdapter(ScopeEnum.Adapter.class) public enum ScopeEnum { SETTINGS("settings"), @@ -146,8 +137,9 @@ public OperationIndexObject operation(OperationEnum operation) { /** * Type of operation to perform (move or copy). + * * @return operation - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -168,8 +160,9 @@ public OperationIndexObject destination(String destination) { /** * The Algolia index name. + * * @return destination - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "products", @@ -198,12 +191,15 @@ public OperationIndexObject addScopeItem(ScopeEnum scopeItem) { } /** - * Scope of the data to copy. When absent, a full copy is performed. When present, only the selected scopes are copied. + * Scope of the data to copy. When absent, a full copy is performed. When present, only the + * selected scopes are copied. + * * @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." + 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; @@ -252,8 +248,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexResponse.java index 252b1afcfe3..0a4b6bb2528 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * OperationIndexResponse - */ - +/** OperationIndexResponse */ public class OperationIndexResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -35,8 +25,9 @@ public OperationIndexResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { @@ -54,8 +45,9 @@ public OperationIndexResponse updatedAt(OffsetDateTime updatedAt) { /** * Date of last update (ISO-8601 format). + * * @return updatedAt - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Date of last update (ISO-8601 format).") public OffsetDateTime getUpdatedAt() { @@ -100,8 +92,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 ac23c187db1..ca84786ff7f 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,24 +1,12 @@ package com.algolia.model; -import com.algolia.model.RankingInfoMatchedGeoLocation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; -/** - * RankingInfo - */ - +/** RankingInfo */ public class RankingInfo { public static final String SERIALIZED_NAME_FILTERS = "filters"; @@ -86,8 +74,9 @@ public RankingInfo filters(Integer filters) { /** * This field is reserved for advanced usage. + * * @return filters - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "This field is reserved for advanced usage.") public Integer getFilters() { @@ -105,8 +94,9 @@ public RankingInfo firstMatchedWord(Integer firstMatchedWord) { /** * Position of the most important matched attribute in the attributes to index list. + * * @return firstMatchedWord - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Position of the most important matched attribute in the attributes to index list." @@ -125,12 +115,15 @@ public RankingInfo geoDistance(Integer geoDistance) { } /** - * 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). + * 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). + * * @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)." + 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; @@ -147,8 +140,9 @@ public RankingInfo geoPrecision(Integer geoPrecision) { /** * Precision used when computing the geo distance, in meters. + * * @return geoPrecision - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Precision used when computing the geo distance, in meters." @@ -181,8 +175,9 @@ public RankingInfo putMatchedGeoLocationItem( /** * Get matchedGeoLocation + * * @return matchedGeoLocation - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public Map getMatchedGeoLocation() { @@ -202,8 +197,9 @@ public RankingInfo nbExactWords(Integer nbExactWords) { /** * Number of exactly matched words. + * * @return nbExactWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Number of exactly matched words.") public Integer getNbExactWords() { @@ -221,8 +217,9 @@ public RankingInfo nbTypos(Integer nbTypos) { /** * Number of typos encountered when matching the record. + * * @return nbTypos - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Number of typos encountered when matching the record." @@ -242,8 +239,9 @@ public RankingInfo promoted(Boolean promoted) { /** * Present and set to true if a Rule promoted the hit. + * * @return promoted - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Present and set to true if a Rule promoted the hit." @@ -262,12 +260,15 @@ public RankingInfo proximityDistance(Integer proximityDistance) { } /** - * When the query contains more than one word, the sum of the distances between matched words (in meters). + * When the query contains more than one word, the sum of the distances between matched words (in + * meters). + * * @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)." + value = "When the query contains more than one word, the sum of the distances between matched" + + " words (in meters)." ) public Integer getProximityDistance() { return proximityDistance; @@ -284,8 +285,9 @@ public RankingInfo userScore(Integer userScore) { /** * Custom ranking for the object, expressed as a single integer value. + * * @return userScore - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Custom ranking for the object, expressed as a single integer value." @@ -305,8 +307,9 @@ public RankingInfo word(Integer word) { /** * Number of matched words, including prefixes and typos. + * * @return word - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Number of matched words, including prefixes and typos." @@ -401,8 +404,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 9f3d772d029..9007f515dc4 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,20 +1,10 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * RankingInfoMatchedGeoLocation - */ - +/** RankingInfoMatchedGeoLocation */ public class RankingInfoMatchedGeoLocation { public static final String SERIALIZED_NAME_LAT = "lat"; @@ -39,8 +29,9 @@ public RankingInfoMatchedGeoLocation lat(Double lat) { /** * Latitude of the matched location. + * * @return lat - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Latitude of the matched location.") public Double getLat() { @@ -58,8 +49,9 @@ public RankingInfoMatchedGeoLocation lng(Double lng) { /** * Longitude of the matched location. + * * @return lng - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Longitude of the matched location.") public Double getLng() { @@ -77,8 +69,9 @@ public RankingInfoMatchedGeoLocation distance(Integer distance) { /** * Distance between the matched location and the search location (in meters). + * * @return distance - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Distance between the matched location and the search location (in meters)." @@ -124,8 +117,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 cb40e9ec033..c077f4165f5 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,24 +1,12 @@ package com.algolia.model; -import com.algolia.model.HighlightResult; -import com.algolia.model.RankingInfo; -import com.algolia.model.SnippetResult; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.HashMap; -import java.util.Map; import java.util.Objects; -/** - * A single record. - */ +/** A single record. */ @ApiModel(description = "A single record.") public class Record extends HashMap { @@ -56,8 +44,9 @@ public Record objectID(String objectID) { /** * Unique identifier of the object. + * * @return objectID - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Unique identifier of the object.") public String getObjectID() { @@ -75,8 +64,9 @@ public Record highlightResult(HighlightResult highlightResult) { /** * Get highlightResult + * * @return highlightResult - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public HighlightResult getHighlightResult() { @@ -94,8 +84,9 @@ public Record snippetResult(SnippetResult snippetResult) { /** * Get snippetResult + * * @return snippetResult - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public SnippetResult getSnippetResult() { @@ -113,8 +104,9 @@ public Record rankingInfo(RankingInfo rankingInfo) { /** * Get rankingInfo + * * @return rankingInfo - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public RankingInfo getRankingInfo() { @@ -132,8 +124,9 @@ public Record distinctSeqID(Integer distinctSeqID) { /** * Get distinctSeqID + * * @return distinctSeqID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public Integer getDistinctSeqID() { @@ -202,8 +195,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 25b04fb457b..ada941fafaa 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,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * RemoveUserIdResponse - */ - +/** RemoveUserIdResponse */ public class RemoveUserIdResponse { public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; @@ -30,8 +20,9 @@ public RemoveUserIdResponse deletedAt(OffsetDateTime deletedAt) { /** * Date of deletion (ISO-8601 format). + * * @return deletedAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -75,8 +66,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 3208f2244a2..176038ae909 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,20 +1,10 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * SaveObjectResponse - */ - +/** SaveObjectResponse */ public class SaveObjectResponse { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -39,8 +29,9 @@ public SaveObjectResponse createdAt(String createdAt) { /** * Get createdAt + * * @return createdAt - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public String getCreatedAt() { @@ -58,8 +49,9 @@ public SaveObjectResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { @@ -77,8 +69,9 @@ public SaveObjectResponse objectID(String objectID) { /** * Unique identifier of the object. + * * @return objectID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Unique identifier of the object.") public String getObjectID() { @@ -125,8 +118,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 ac8827cf7ad..47a5c4d96e9 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,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * SaveSynonymResponse - */ - +/** SaveSynonymResponse */ public class SaveSynonymResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -40,8 +30,9 @@ public SaveSynonymResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -62,8 +53,9 @@ public SaveSynonymResponse updatedAt(OffsetDateTime updatedAt) { /** * Date of last update (ISO-8601 format). + * * @return updatedAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -84,8 +76,9 @@ public SaveSynonymResponse id(String id) { /** * objectID of the inserted object. + * * @return id - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "objectID of the inserted object.") public String getId() { @@ -132,8 +125,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymsResponse.java index 91fa20fb589..f6b8e6da208 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SaveSynonymsResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * SaveSynonymsResponse - */ - +/** SaveSynonymsResponse */ public class SaveSynonymsResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -35,8 +25,9 @@ public SaveSynonymsResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -57,8 +48,9 @@ public SaveSynonymsResponse updatedAt(OffsetDateTime updatedAt) { /** * Date of last update (ISO-8601 format). + * * @return updatedAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -106,8 +98,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 cfde66c968e..0901da6c69c 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,23 +1,12 @@ package com.algolia.model; -import com.algolia.model.Record; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * SearchHits - */ - +/** SearchHits */ public class SearchHits { public static final String SERIALIZED_NAME_HITS = "hits"; @@ -40,8 +29,9 @@ public SearchHits addHitsItem(Record hitsItem) { /** * Get hits + * * @return hits - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public List getHits() { @@ -79,8 +69,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 8b70d9e4a30..81b9a491f54 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 @@ -1,14 +1,10 @@ package com.algolia.model; -import com.algolia.model.BaseSearchParams; -import com.algolia.model.IndexSettingsAsSearchParams; -import com.algolia.model.OneOfintegerstring; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; 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.math.BigDecimal; @@ -18,10 +14,7 @@ import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** - * SearchParams - */ - +/** SearchParams */ public class SearchParams { public static final String SERIALIZED_NAME_QUERY = "query"; @@ -302,9 +295,7 @@ public class SearchParams { @SerializedName(SERIALIZED_NAME_MIN_WORD_SIZEFOR2_TYPOS) private Integer minWordSizefor2Typos = 8; - /** - * Controls whether typo tolerance is enabled and how it is applied. - */ + /** Controls whether typo tolerance is enabled and how it is applied. */ @JsonAdapter(TypoToleranceEnum.Adapter.class) public enum TypoToleranceEnum { TRUE("true"), @@ -420,9 +411,7 @@ public TypoToleranceEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_ENABLE_PERSONALIZATION) private Boolean enablePersonalization = false; - /** - * Controls if and how query words are interpreted as prefixes. - */ + /** Controls if and how query words are interpreted as prefixes. */ @JsonAdapter(QueryTypeEnum.Adapter.class) public enum QueryTypeEnum { PREFIXLAST("prefixLast"), @@ -479,9 +468,7 @@ public QueryTypeEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_QUERY_TYPE) private QueryTypeEnum queryType = QueryTypeEnum.PREFIXLAST; - /** - * Selects a strategy to remove words from the query when it doesn’t match any hits. - */ + /** Selects a strategy to remove words from the query when it doesn’t match any hits. */ @JsonAdapter(RemoveWordsIfNoResultsEnum.Adapter.class) public enum RemoveWordsIfNoResultsEnum { NONE("none"), @@ -559,9 +546,7 @@ public RemoveWordsIfNoResultsEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_DISABLE_EXACT_ON_ATTRIBUTES) private List disableExactOnAttributes = null; - /** - * Controls how the exact ranking criterion is computed when the query contains only one word. - */ + /** Controls how the exact ranking criterion is computed when the query contains only one word. */ @JsonAdapter(ExactOnSingleWordQueryEnum.Adapter.class) public enum ExactOnSingleWordQueryEnum { ATTRIBUTE("attribute"), @@ -621,9 +606,7 @@ public ExactOnSingleWordQueryEnum read(final JsonReader jsonReader) private ExactOnSingleWordQueryEnum exactOnSingleWordQuery = ExactOnSingleWordQueryEnum.ATTRIBUTE; - /** - * Gets or Sets alternativesAsExact - */ + /** Gets or Sets alternativesAsExact */ @JsonAdapter(AlternativesAsExactEnum.Adapter.class) public enum AlternativesAsExactEnum { IGNOREPLURALS("ignorePlurals"), @@ -681,9 +664,7 @@ public AlternativesAsExactEnum read(final JsonReader jsonReader) @SerializedName(SERIALIZED_NAME_ALTERNATIVES_AS_EXACT) private List alternativesAsExact = null; - /** - * Gets or Sets advancedSyntaxFeatures - */ + /** Gets or Sets advancedSyntaxFeatures */ @JsonAdapter(AdvancedSyntaxFeaturesEnum.Adapter.class) public enum AdvancedSyntaxFeaturesEnum { EXACTPHRASE("exactPhrase"), @@ -790,8 +771,9 @@ public SearchParams query(String query) { /** * The text to search in the index. + * * @return query - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { @@ -808,12 +790,15 @@ public SearchParams similarQuery(String similarQuery) { } /** - * Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. + * Overrides the query parameter and performs a more generic search that can be used to find + * \"similar\" results. + * * @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." + value = "Overrides the query parameter and performs a more generic search that can be used to" + + " find \"similar\" results." ) public String getSimilarQuery() { return similarQuery; @@ -830,8 +815,9 @@ public SearchParams filters(String filters) { /** * Filter the query with numeric, facet and/or tag filters. + * * @return filters - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Filter the query with numeric, facet and/or tag filters." @@ -859,8 +845,9 @@ public SearchParams addFacetFiltersItem(String facetFiltersItem) { /** * Filter hits by facet value. + * * @return facetFilters - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Filter hits by facet value.") public List getFacetFilters() { @@ -885,12 +872,15 @@ public SearchParams addOptionalFiltersItem(String optionalFiltersItem) { } /** - * Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. + * Create filters for ranking purposes, where records that match the filter are ranked higher, or + * lower in the case of a negative optional filter. + * * @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." + 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; @@ -915,8 +905,9 @@ public SearchParams addNumericFiltersItem(String numericFiltersItem) { /** * Filter on numeric attributes. + * * @return numericFilters - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Filter on numeric attributes.") public List getNumericFilters() { @@ -942,8 +933,9 @@ public SearchParams addTagFiltersItem(String tagFiltersItem) { /** * Filter hits by tags. + * * @return tagFilters - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Filter hits by tags.") public List getTagFilters() { @@ -961,8 +953,9 @@ public SearchParams sumOrFiltersScores(Boolean sumOrFiltersScores) { /** * Determines how to calculate the total score for filtering. + * * @return sumOrFiltersScores - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Determines how to calculate the total score for filtering." @@ -990,8 +983,9 @@ public SearchParams addFacetsItem(String facetsItem) { /** * Retrieve facets and their facet values. + * * @return facets - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Retrieve facets and their facet values.") public List getFacets() { @@ -1009,8 +1003,9 @@ public SearchParams maxValuesPerFacet(Integer maxValuesPerFacet) { /** * Maximum number of facet values to return for each facet during a regular search. + * * @return maxValuesPerFacet - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Maximum number of facet values to return for each facet during a regular search." @@ -1030,8 +1025,9 @@ public SearchParams facetingAfterDistinct(Boolean facetingAfterDistinct) { /** * Force faceting to be applied after de-duplication (via the Distinct setting). + * * @return facetingAfterDistinct - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Force faceting to be applied after de-duplication (via the Distinct setting)." @@ -1051,8 +1047,9 @@ public SearchParams sortFacetValuesBy(String sortFacetValuesBy) { /** * Controls how facet values are fetched. + * * @return sortFacetValuesBy - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Controls how facet values are fetched.") public String getSortFacetValuesBy() { @@ -1070,8 +1067,9 @@ public SearchParams page(Integer page) { /** * Specify the page to retrieve. + * * @return page - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { @@ -1089,8 +1087,9 @@ public SearchParams offset(Integer offset) { /** * Specify the offset of the first hit to return. + * * @return offset - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specify the offset of the first hit to return.") public Integer getOffset() { @@ -1107,11 +1106,10 @@ public SearchParams length(Integer length) { } /** - * Set the number of hits to retrieve (used only with offset). - * minimum: 1 - * maximum: 1000 + * Set the number of hits to retrieve (used only with offset). minimum: 1 maximum: 1000 + * * @return length - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Set the number of hits to retrieve (used only with offset)." @@ -1131,11 +1129,13 @@ public SearchParams aroundLatLng(String aroundLatLng) { /** * Search for entries around a central geolocation, enabling a geo search within a circular area. + * * @return aroundLatLng - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Search for entries around a central geolocation, enabling a geo search within a circular area." + value = "Search for entries around a central geolocation, enabling a geo search within a circular" + + " area." ) public String getAroundLatLng() { return aroundLatLng; @@ -1151,12 +1151,15 @@ public SearchParams aroundLatLngViaIP(Boolean aroundLatLngViaIP) { } /** - * Search for entries around a given location automatically computed from the requester’s IP address. + * Search for entries around a given location automatically computed from the requester’s IP + * address. + * * @return aroundLatLngViaIP - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Search for entries around a given location automatically computed from the requester’s IP address." + value = "Search for entries around a given location automatically computed from the requester’s" + + " IP address." ) public Boolean getAroundLatLngViaIP() { return aroundLatLngViaIP; @@ -1173,8 +1176,9 @@ public SearchParams aroundRadius(OneOfintegerstring aroundRadius) { /** * Define the maximum radius for a geo search (in meters). + * * @return aroundRadius - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Define the maximum radius for a geo search (in meters)." @@ -1194,11 +1198,13 @@ public SearchParams aroundPrecision(Integer aroundPrecision) { /** * Precision of geo search (in meters), to add grouping by geo location to the ranking formula. + * * @return aroundPrecision - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Precision of geo search (in meters), to add grouping by geo location to the ranking formula." + value = "Precision of geo search (in meters), to add grouping by geo location to the ranking" + + " formula." ) public Integer getAroundPrecision() { return aroundPrecision; @@ -1214,10 +1220,10 @@ public SearchParams minimumAroundRadius(Integer minimumAroundRadius) { } /** - * Minimum radius (in meters) used for a geo search when aroundRadius is not set. - * minimum: 1 + * Minimum radius (in meters) used for a geo search when aroundRadius is not set. minimum: 1 + * * @return minimumAroundRadius - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Minimum radius (in meters) used for a geo search when aroundRadius is not set." @@ -1247,8 +1253,9 @@ public SearchParams addInsideBoundingBoxItem( /** * Search inside a rectangular area (in geo coordinates). + * * @return insideBoundingBox - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Search inside a rectangular area (in geo coordinates)." @@ -1276,8 +1283,9 @@ public SearchParams addInsidePolygonItem(BigDecimal insidePolygonItem) { /** * Search inside a polygon (in geo coordinates). + * * @return insidePolygon - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Search inside a polygon (in geo coordinates).") public List getInsidePolygon() { @@ -1302,12 +1310,21 @@ public SearchParams addNaturalLanguagesItem(String naturalLanguagesItem) { } /** - * 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. + * 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. + * * @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." + 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; @@ -1332,8 +1349,9 @@ public SearchParams addRuleContextsItem(String ruleContextsItem) { /** * Enables contextual rules. + * * @return ruleContexts - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables contextual rules.") public List getRuleContexts() { @@ -1351,8 +1369,9 @@ public SearchParams personalizationImpact(Integer personalizationImpact) { /** * Define the impact of the Personalization feature. + * * @return personalizationImpact - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Define the impact of the Personalization feature.") public Integer getPersonalizationImpact() { @@ -1370,8 +1389,9 @@ public SearchParams userToken(String userToken) { /** * Associates a certain user token with the current search. + * * @return userToken - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Associates a certain user token with the current search." @@ -1391,8 +1411,9 @@ public SearchParams getRankingInfo(Boolean getRankingInfo) { /** * Retrieve detailed ranking information. + * * @return getRankingInfo - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Retrieve detailed ranking information.") public Boolean getGetRankingInfo() { @@ -1410,8 +1431,9 @@ public SearchParams clickAnalytics(Boolean clickAnalytics) { /** * Enable the Click Analytics feature. + * * @return clickAnalytics - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enable the Click Analytics feature.") public Boolean getClickAnalytics() { @@ -1429,8 +1451,9 @@ public SearchParams analytics(Boolean analytics) { /** * Whether the current query will be taken into account in the Analytics. + * * @return analytics - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether the current query will be taken into account in the Analytics." @@ -1458,8 +1481,9 @@ public SearchParams addAnalyticsTagsItem(String analyticsTagsItem) { /** * List of tags to apply to the query for analytics purposes. + * * @return analyticsTags - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of tags to apply to the query for analytics purposes." @@ -1479,8 +1503,9 @@ public SearchParams percentileComputation(Boolean percentileComputation) { /** * Whether to include or exclude a query from the processing-time percentile computation. + * * @return percentileComputation - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to include or exclude a query from the processing-time percentile computation." @@ -1500,8 +1525,9 @@ public SearchParams enableABTest(Boolean enableABTest) { /** * Whether this search should participate in running AB tests. + * * @return enableABTest - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether this search should participate in running AB tests." @@ -1521,8 +1547,9 @@ public SearchParams enableReRanking(Boolean enableReRanking) { /** * Whether this search should use AI Re-Ranking. + * * @return enableReRanking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Whether this search should use AI Re-Ranking.") public Boolean getEnableReRanking() { @@ -1550,8 +1577,9 @@ public SearchParams addSearchableAttributesItem( /** * The complete list of attributes used for searching. + * * @return searchableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The complete list of attributes used for searching." @@ -1583,8 +1611,9 @@ public SearchParams addAttributesForFacetingItem( /** * The complete list of attributes that will be used for faceting. + * * @return attributesForFaceting - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The complete list of attributes that will be used for faceting." @@ -1616,8 +1645,9 @@ public SearchParams addUnretrievableAttributesItem( /** * List of attributes that can’t be retrieved at query time. + * * @return unretrievableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes that can’t be retrieved at query time." @@ -1647,8 +1677,9 @@ public SearchParams addAttributesToRetrieveItem( /** * This parameter controls which attributes to retrieve and which not to retrieve. + * * @return attributesToRetrieve - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "This parameter controls which attributes to retrieve and which not to retrieve." @@ -1680,8 +1711,9 @@ public SearchParams addRestrictSearchableAttributesItem( /** * Restricts a given query to look in only a subset of your searchable attributes. + * * @return restrictSearchableAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Restricts a given query to look in only a subset of your searchable attributes." @@ -1711,8 +1743,9 @@ public SearchParams addRankingItem(String rankingItem) { /** * Controls how Algolia should sort your results. + * * @return ranking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Controls how Algolia should sort your results.") public List getRanking() { @@ -1738,8 +1771,9 @@ public SearchParams addCustomRankingItem(String customRankingItem) { /** * Specifies the custom ranking criterion. + * * @return customRanking - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specifies the custom ranking criterion.") public List getCustomRanking() { @@ -1756,12 +1790,15 @@ public SearchParams relevancyStrictness(Integer relevancyStrictness) { } /** - * Controls the relevancy threshold below which less relevant results aren’t included in the results. + * Controls the relevancy threshold below which less relevant results aren’t included in the + * results. + * * @return relevancyStrictness - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Controls the relevancy threshold below which less relevant results aren’t included in the results." + value = "Controls the relevancy threshold below which less relevant results aren’t included in" + + " the results." ) public Integer getRelevancyStrictness() { return relevancyStrictness; @@ -1790,8 +1827,9 @@ public SearchParams addAttributesToHighlightItem( /** * List of attributes to highlight. + * * @return attributesToHighlight - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "List of attributes to highlight.") public List getAttributesToHighlight() { @@ -1819,8 +1857,9 @@ public SearchParams addAttributesToSnippetItem( /** * List of attributes to snippet, with an optional maximum number of words to snippet. + * * @return attributesToSnippet - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes to snippet, with an optional maximum number of words to snippet." @@ -1840,11 +1879,13 @@ public SearchParams highlightPreTag(String highlightPreTag) { /** * The HTML string to insert before the highlighted parts in all highlight and snippet results. + * * @return highlightPreTag - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The HTML string to insert before the highlighted parts in all highlight and snippet results." + value = "The HTML string to insert before the highlighted parts in all highlight and snippet" + + " results." ) public String getHighlightPreTag() { return highlightPreTag; @@ -1861,11 +1902,13 @@ public SearchParams highlightPostTag(String highlightPostTag) { /** * The HTML string to insert after the highlighted parts in all highlight and snippet results. + * * @return highlightPostTag - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The HTML string to insert after the highlighted parts in all highlight and snippet results." + value = "The HTML string to insert after the highlighted parts in all highlight and snippet" + + " results." ) public String getHighlightPostTag() { return highlightPostTag; @@ -1882,8 +1925,9 @@ public SearchParams snippetEllipsisText(String snippetEllipsisText) { /** * String used as an ellipsis indicator when a snippet is truncated. + * * @return snippetEllipsisText - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "String used as an ellipsis indicator when a snippet is truncated." @@ -1905,8 +1949,9 @@ public SearchParams restrictHighlightAndSnippetArrays( /** * Restrict highlighting and snippeting to items that matched the query. + * * @return restrictHighlightAndSnippetArrays - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Restrict highlighting and snippeting to items that matched the query." @@ -1928,8 +1973,9 @@ public SearchParams hitsPerPage(Integer hitsPerPage) { /** * Set the number of hits per page. + * * @return hitsPerPage - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { @@ -1946,12 +1992,15 @@ public SearchParams minWordSizefor1Typo(Integer minWordSizefor1Typo) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * Minimum number of characters a word in the query string must contain to accept matches with 1 + * typo. + * * @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." + value = "Minimum number of characters a word in the query string must contain to accept matches" + + " with 1 typo." ) public Integer getMinWordSizefor1Typo() { return minWordSizefor1Typo; @@ -1967,12 +2016,15 @@ public SearchParams minWordSizefor2Typos(Integer minWordSizefor2Typos) { } /** - * Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * Minimum number of characters a word in the query string must contain to accept matches with 2 + * typos. + * * @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." + value = "Minimum number of characters a word in the query string must contain to accept matches" + + " with 2 typos." ) public Integer getMinWordSizefor2Typos() { return minWordSizefor2Typos; @@ -1989,8 +2041,9 @@ public SearchParams typoTolerance(TypoToleranceEnum typoTolerance) { /** * Controls whether typo tolerance is enabled and how it is applied. + * * @return typoTolerance - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Controls whether typo tolerance is enabled and how it is applied." @@ -2012,8 +2065,9 @@ public SearchParams allowTyposOnNumericTokens( /** * Whether to allow typos on numbers (“numeric tokens”) in the query string. + * * @return allowTyposOnNumericTokens - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to allow typos on numbers (“numeric tokens”) in the query string." @@ -2047,8 +2101,9 @@ public SearchParams addDisableTypoToleranceOnAttributesItem( /** * List of attributes on which you want to disable typo tolerance. + * * @return disableTypoToleranceOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable typo tolerance." @@ -2070,8 +2125,9 @@ public SearchParams separatorsToIndex(String separatorsToIndex) { /** * Control which separators are indexed. + * * @return separatorsToIndex - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Control which separators are indexed.") public String getSeparatorsToIndex() { @@ -2089,8 +2145,9 @@ public SearchParams ignorePlurals(String ignorePlurals) { /** * Treats singular, plurals, and other forms of declensions as matching terms. + * * @return ignorePlurals - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Treats singular, plurals, and other forms of declensions as matching terms." @@ -2110,8 +2167,9 @@ public SearchParams removeStopWords(String removeStopWords) { /** * Removes stop (common) words from the query before executing it. + * * @return removeStopWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Removes stop (common) words from the query before executing it." @@ -2133,8 +2191,9 @@ public SearchParams keepDiacriticsOnCharacters( /** * List of characters that the engine shouldn’t automatically normalize. + * * @return keepDiacriticsOnCharacters - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of characters that the engine shouldn’t automatically normalize." @@ -2161,12 +2220,15 @@ public SearchParams addQueryLanguagesItem(String queryLanguagesItem) { } /** - * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * Sets the languages to be used by language-specific settings and functionalities such as + * ignorePlurals, removeStopWords, and CJK word-detection. + * * @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." + 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; @@ -2183,8 +2245,9 @@ public SearchParams decompoundQuery(Boolean decompoundQuery) { /** * Splits compound words into their composing atoms in the query. + * * @return decompoundQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Splits compound words into their composing atoms in the query." @@ -2204,8 +2267,9 @@ public SearchParams enableRules(Boolean enableRules) { /** * Whether Rules should be globally enabled. + * * @return enableRules - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Whether Rules should be globally enabled.") public Boolean getEnableRules() { @@ -2223,8 +2287,9 @@ public SearchParams enablePersonalization(Boolean enablePersonalization) { /** * Enable the Personalization feature. + * * @return enablePersonalization - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enable the Personalization feature.") public Boolean getEnablePersonalization() { @@ -2242,8 +2307,9 @@ public SearchParams queryType(QueryTypeEnum queryType) { /** * Controls if and how query words are interpreted as prefixes. + * * @return queryType - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Controls if and how query words are interpreted as prefixes." @@ -2265,8 +2331,9 @@ public SearchParams removeWordsIfNoResults( /** * Selects a strategy to remove words from the query when it doesn’t match any hits. + * * @return removeWordsIfNoResults - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Selects a strategy to remove words from the query when it doesn’t match any hits." @@ -2288,8 +2355,9 @@ public SearchParams advancedSyntax(Boolean advancedSyntax) { /** * Enables the advanced query syntax. + * * @return advancedSyntax - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables the advanced query syntax.") public Boolean getAdvancedSyntax() { @@ -2315,8 +2383,9 @@ public SearchParams addOptionalWordsItem(String optionalWordsItem) { /** * A list of words that should be considered as optional when found in the query. + * * @return optionalWords - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "A list of words that should be considered as optional when found in the query." @@ -2348,8 +2417,9 @@ public SearchParams addDisableExactOnAttributesItem( /** * List of attributes on which you want to disable the exact ranking criterion. + * * @return disableExactOnAttributes - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "List of attributes on which you want to disable the exact ranking criterion." @@ -2373,11 +2443,13 @@ public SearchParams exactOnSingleWordQuery( /** * Controls how the exact ranking criterion is computed when the query contains only one word. + * * @return exactOnSingleWordQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Controls how the exact ranking criterion is computed when the query contains only one word." + value = "Controls how the exact ranking criterion is computed when the query contains only one" + + " word." ) public ExactOnSingleWordQueryEnum getExactOnSingleWordQuery() { return exactOnSingleWordQuery; @@ -2408,11 +2480,13 @@ public SearchParams addAlternativesAsExactItem( /** * List of alternatives that should be considered an exact match by the exact ranking criterion. + * * @return alternativesAsExact - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "List of alternatives that should be considered an exact match by the exact ranking criterion." + value = "List of alternatives that should be considered an exact match by the exact ranking" + + " criterion." ) public List getAlternativesAsExact() { return alternativesAsExact; @@ -2442,12 +2516,15 @@ public SearchParams addAdvancedSyntaxFeaturesItem( } /** - * Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled. + * Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is + * enabled. + * * @return advancedSyntaxFeatures - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled." + value = "Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is" + + " enabled." ) public List getAdvancedSyntaxFeatures() { return advancedSyntaxFeatures; @@ -2465,11 +2542,10 @@ public SearchParams distinct(Integer distinct) { } /** - * Enables de-duplication or grouping of results. - * minimum: 0 - * maximum: 4 + * Enables de-duplication or grouping of results. minimum: 0 maximum: 4 + * * @return distinct - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Enables de-duplication or grouping of results.") public Integer getDistinct() { @@ -2487,8 +2563,9 @@ public SearchParams synonyms(Boolean synonyms) { /** * Whether to take into account an index’s synonyms for a particular search. + * * @return synonyms - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether to take into account an index’s synonyms for a particular search." @@ -2509,12 +2586,15 @@ public SearchParams replaceSynonymsInHighlight( } /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * Whether to highlight and snippet the original word that matches the synonym or the synonym + * itself. + * * @return replaceSynonymsInHighlight - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Whether to highlight and snippet the original word that matches the synonym or the synonym itself." + value = "Whether to highlight and snippet the original word that matches the synonym or the" + + " synonym itself." ) public Boolean getReplaceSynonymsInHighlight() { return replaceSynonymsInHighlight; @@ -2532,11 +2612,10 @@ public SearchParams minProximity(Integer minProximity) { } /** - * Precision of the proximity ranking criterion. - * minimum: 1 - * maximum: 7 + * Precision of the proximity ranking criterion. minimum: 1 maximum: 7 + * * @return minProximity - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Precision of the proximity ranking criterion.") public Integer getMinProximity() { @@ -2561,12 +2640,15 @@ public SearchParams addResponseFieldsItem(String responseFieldsItem) { } /** - * Choose which fields to return in the API response. This parameters applies to search and browse queries. + * Choose which fields to return in the API response. This parameters applies to search and browse + * queries. + * * @return responseFields - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "Choose which fields to return in the API response. This parameters applies to search and browse queries." + value = "Choose which fields to return in the API response. This parameters applies to search and" + + " browse queries." ) public List getResponseFields() { return responseFields; @@ -2583,8 +2665,9 @@ public SearchParams maxFacetHits(Integer maxFacetHits) { /** * Maximum number of facet hits to return during a search for facet values. + * * @return maxFacetHits - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Maximum number of facet hits to return during a search for facet values." @@ -2606,12 +2689,15 @@ public SearchParams attributeCriteriaComputedByMinProximity( } /** - * 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. + * 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. + * * @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." + 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; @@ -2630,12 +2716,15 @@ public SearchParams renderingContent(Object renderingContent) { } /** - * 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. + * 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. + * * @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." + 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; @@ -3215,8 +3304,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 c3a77c0b1e4..a1437ac2707 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,28 +1,14 @@ package com.algolia.model; -import com.algolia.model.BaseSearchResponse; -import com.algolia.model.BaseSearchResponseFacetsStats; -import com.algolia.model.Record; -import com.algolia.model.SearchHits; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -/** - * SearchResponse - */ - +/** SearchResponse */ public class SearchResponse { public static final String SERIALIZED_NAME_AB_TEST_I_D = "abTestID"; @@ -162,12 +148,15 @@ public SearchResponse abTestID(Integer abTestID) { } /** - * If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID. + * If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test + * ID. + * * @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." + 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,12 +172,15 @@ public SearchResponse abTestVariantID(Integer abTestVariantID) { } /** - * If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used. + * If a search encounters an index that is being A/B tested, abTestVariantID reports the variant + * ID of the index used. + * * @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." + 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; @@ -205,8 +197,9 @@ public SearchResponse aroundLatLng(String aroundLatLng) { /** * The computed geo location. + * * @return aroundLatLng - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "The computed geo location.") public String getAroundLatLng() { @@ -223,12 +216,15 @@ public SearchResponse automaticRadius(String automaticRadius) { } /** - * The automatically computed radius. For legacy reasons, this parameter is a string and not an integer. + * The automatically computed radius. For legacy reasons, this parameter is a string and not an + * integer. + * * @return automaticRadius - **/ + */ @javax.annotation.Nullable @ApiModelProperty( - value = "The automatically computed radius. For legacy reasons, this parameter is a string and not an integer." + value = "The automatically computed radius. For legacy reasons, this parameter is a string and" + + " not an integer." ) public String getAutomaticRadius() { return automaticRadius; @@ -245,8 +241,9 @@ public SearchResponse exhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { /** * Whether the facet count is exhaustive or approximate. + * * @return exhaustiveFacetsCount - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Whether the facet count is exhaustive or approximate." @@ -266,8 +263,9 @@ public SearchResponse exhaustiveNbHits(Boolean exhaustiveNbHits) { /** * Indicate if the nbHits count was exhaustive or approximate + * * @return exhaustiveNbHits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -287,13 +285,16 @@ public SearchResponse exhaustiveTypo(Boolean exhaustiveTypo) { } /** - * Indicate if the typo-tolerence search was exhaustive or approximate (only included when typo-tolerance is enabled) + * Indicate if the typo-tolerence search was exhaustive or approximate (only included when + * typo-tolerance is enabled) + * * @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)" + value = "Indicate if the typo-tolerence search was exhaustive or approximate (only included when" + + " typo-tolerance is enabled)" ) public Boolean getExhaustiveTypo() { return exhaustiveTypo; @@ -321,8 +322,9 @@ public SearchResponse putFacetsItem( /** * A mapping of each facet name to the corresponding facet counts. + * * @return facets - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "{\"category\":{\"food\":1,\"tech\":42}}", @@ -356,8 +358,9 @@ public SearchResponse putFacetsStatsItem( /** * Statistics for numerical facets. + * * @return facetsStats - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Statistics for numerical facets.") public Map getFacetsStats() { @@ -377,8 +380,9 @@ public SearchResponse hitsPerPage(Integer hitsPerPage) { /** * Set the number of hits per page. + * * @return hitsPerPage - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Set the number of hits per page.") public Integer getHitsPerPage() { @@ -396,8 +400,9 @@ public SearchResponse index(String index) { /** * Index name used for the query. + * * @return index - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "indexName", @@ -417,13 +422,16 @@ public SearchResponse indexUsed(String indexUsed) { } /** - * 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. + * 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. + * * @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." + 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; @@ -440,8 +448,9 @@ public SearchResponse message(String message) { /** * Used to return warnings about the query. + * * @return message - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Used to return warnings about the query.") public String getMessage() { @@ -459,8 +468,9 @@ public SearchResponse nbHits(Integer nbHits) { /** * Number of hits that the search query matched. + * * @return nbHits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "20", @@ -482,8 +492,9 @@ public SearchResponse nbPages(Integer nbPages) { /** * Number of pages available for the current query + * * @return nbPages - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "1", @@ -505,8 +516,9 @@ public SearchResponse nbSortedHits(Integer nbSortedHits) { /** * The number of hits selected and sorted by the relevant sort algorithm + * * @return nbSortedHits - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "20", @@ -527,8 +539,9 @@ public SearchResponse page(Integer page) { /** * Specify the page to retrieve. + * * @return page - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Specify the page to retrieve.") public Integer getPage() { @@ -546,8 +559,9 @@ public SearchResponse params(String params) { /** * A url-encoded string of all search parameters. + * * @return params - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "query=a&hitsPerPage=20", @@ -569,8 +583,9 @@ public SearchResponse parsedQuery(String parsedQuery) { /** * The query string that will be searched, after normalization. + * * @return parsedQuery - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "The query string that will be searched, after normalization." @@ -590,8 +605,9 @@ public SearchResponse processingTimeMS(Integer processingTimeMS) { /** * Time the server took to process the request, in milliseconds. + * * @return processingTimeMS - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "20", @@ -613,8 +629,9 @@ public SearchResponse query(String query) { /** * The text to search in the index. + * * @return query - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "The text to search in the index.") public String getQuery() { @@ -631,12 +648,15 @@ public SearchResponse queryAfterRemoval(String queryAfterRemoval) { } /** - * A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set. + * A markup text indicating which parts of the original query have been removed in order to + * retrieve a non-empty result set. + * * @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." + 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; @@ -653,8 +673,9 @@ public SearchResponse serverUsed(String serverUsed) { /** * Actual host name of the server that processed the request. + * * @return serverUsed - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Actual host name of the server that processed the request." @@ -682,8 +703,9 @@ public SearchResponse putUserDataItem(String key, Object userDataItem) { /** * Lets you store custom data in your indices. + * * @return userData - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Lets you store custom data in your indices.") public Map getUserData() { @@ -706,8 +728,9 @@ public SearchResponse addHitsItem(Record hitsItem) { /** * Get hits + * * @return hits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "") public List getHits() { @@ -869,8 +892,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 cb5c7c7c3fa..ea57089c759 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,25 +1,13 @@ package com.algolia.model; -import com.algolia.model.SynonymHit; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Objects; -/** - * SearchSynonymsResponse - */ - +/** SearchSynonymsResponse */ public class SearchSynonymsResponse extends HashMap { public static final String SERIALIZED_NAME_HITS = "hits"; @@ -44,8 +32,9 @@ public SearchSynonymsResponse addHitsItem(SynonymHit hitsItem) { /** * Array of synonym objects. + * * @return hits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Array of synonym objects.") public List getHits() { @@ -63,8 +52,9 @@ public SearchSynonymsResponse nbHits(Integer nbHits) { /** * Number of hits that the search query matched. + * * @return nbHits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "20", @@ -112,8 +102,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 2f0b03fee24..d093d293312 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,19 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * OK - */ +/** OK */ @ApiModel(description = "OK") public class SearchUserIdsObject { @@ -43,13 +35,16 @@ public SearchUserIdsObject query(String query) { } /** - * Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. + * Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve + * all users. + * * @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." + value = "Query to search. The search is a prefix search with typoTolerance. Use empty query to" + + " retrieve all users." ) public String getQuery() { return query; @@ -66,8 +61,9 @@ public SearchUserIdsObject clusterName(String clusterName) { /** * Name of the cluster. + * * @return clusterName - **/ + */ @javax.annotation.Nullable @ApiModelProperty(example = "c11-test", value = "Name of the cluster.") public String getClusterName() { @@ -85,8 +81,9 @@ public SearchUserIdsObject page(Integer page) { /** * Specify the page to retrieve. + * * @return page - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Specify the page to retrieve.") public Integer getPage() { @@ -104,8 +101,9 @@ public SearchUserIdsObject hitsPerPage(Integer hitsPerPage) { /** * Set the number of hits per page. + * * @return hitsPerPage - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Set the number of hits per page.") public Integer getHitsPerPage() { @@ -157,8 +155,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 ee8eedee3df..2d4535802b3 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,23 +1,14 @@ package com.algolia.model; -import com.algolia.model.SearchUserIdsResponseHits; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; -/** - * userIDs data. - */ +/** userIDs data. */ @ApiModel(description = "userIDs data.") public class SearchUserIdsResponse { @@ -58,8 +49,9 @@ public SearchUserIdsResponse addHitsItem(SearchUserIdsResponseHits hitsItem) { /** * List of user object matching the query. + * * @return hits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -80,8 +72,9 @@ public SearchUserIdsResponse nbHits(Object nbHits) { /** * Get nbHits + * * @return nbHits - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "") public Object getNbHits() { @@ -99,8 +92,9 @@ public SearchUserIdsResponse page(Integer page) { /** * Specify the page to retrieve. + * * @return page - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Specify the page to retrieve.") public Integer getPage() { @@ -118,8 +112,9 @@ public SearchUserIdsResponse hitsPerPage(Integer hitsPerPage) { /** * Set the number of hits per page. + * * @return hitsPerPage - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Set the number of hits per page.") public Integer getHitsPerPage() { @@ -137,8 +132,9 @@ public SearchUserIdsResponse updatedAt(OffsetDateTime updatedAt) { /** * Date of last update (ISO-8601 format). + * * @return updatedAt - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -195,8 +191,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 d334685b1a3..a306783eb5c 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,21 +1,10 @@ package com.algolia.model; -import com.algolia.model.HighlightResult; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * SearchUserIdsResponseHighlightResult - */ - +/** SearchUserIdsResponseHighlightResult */ public class SearchUserIdsResponseHighlightResult { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @@ -35,8 +24,9 @@ public SearchUserIdsResponseHighlightResult userID(HighlightResult userID) { /** * Get userID + * * @return userID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public HighlightResult getUserID() { @@ -56,8 +46,9 @@ public SearchUserIdsResponseHighlightResult clusterName( /** * Get clusterName + * * @return clusterName - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public HighlightResult getClusterName() { @@ -108,8 +99,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 1a11d4058e4..33b08d8f726 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,22 +1,10 @@ package com.algolia.model; -import com.algolia.model.SearchUserIdsResponseHighlightResult; -import com.algolia.model.UserId; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * SearchUserIdsResponseHits - */ - +/** SearchUserIdsResponseHits */ public class SearchUserIdsResponseHits { public static final String SERIALIZED_NAME_USER_I_D = "userID"; @@ -57,8 +45,9 @@ public SearchUserIdsResponseHits userID(UserId userID) { /** * Get userID + * * @return userID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public UserId getUserID() { @@ -76,8 +65,9 @@ public SearchUserIdsResponseHits clusterName(String clusterName) { /** * Name of the cluster. + * * @return clusterName - **/ + */ @javax.annotation.Nullable @ApiModelProperty(example = "c11-test", value = "Name of the cluster.") public String getClusterName() { @@ -95,8 +85,9 @@ public SearchUserIdsResponseHits nbRecords(Integer nbRecords) { /** * Number of records in the cluster. + * * @return nbRecords - **/ + */ @javax.annotation.Nullable @ApiModelProperty(example = "3", value = "Number of records in the cluster.") public Integer getNbRecords() { @@ -114,8 +105,9 @@ public SearchUserIdsResponseHits dataSize(Integer dataSize) { /** * Data size taken by all the users assigned to the cluster. + * * @return dataSize - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "481", @@ -136,8 +128,9 @@ public SearchUserIdsResponseHits objectID(String objectID) { /** * userID of the requested user. Same as userID. + * * @return objectID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "userID of the requested user. Same as userID.") public String getObjectID() { @@ -157,8 +150,9 @@ public SearchUserIdsResponseHits highlightResult( /** * Get highlightResult + * * @return highlightResult - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public SearchUserIdsResponseHighlightResult getHighlightResult() { @@ -229,8 +223,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SetSettingsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SetSettingsResponse.java index 00753353ecf..bdb6ef85d2a 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SetSettingsResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SetSettingsResponse.java @@ -1,21 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.time.OffsetDateTime; -import java.util.Arrays; import java.util.Objects; -/** - * SetSettingsResponse - */ - +/** SetSettingsResponse */ public class SetSettingsResponse { public static final String SERIALIZED_NAME_TASK_I_D = "taskID"; @@ -35,8 +25,9 @@ public SetSettingsResponse taskID(Integer taskID) { /** * taskID of the indexing task to wait for. + * * @return taskID - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "taskID of the indexing task to wait for.") public Integer getTaskID() { @@ -54,8 +45,9 @@ public SetSettingsResponse updatedAt(OffsetDateTime updatedAt) { /** * Date of last update (ISO-8601 format). + * * @return updatedAt - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Date of last update (ISO-8601 format).") public OffsetDateTime getUpdatedAt() { @@ -100,8 +92,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 d77d10a6ee4..f117c587671 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,11 @@ 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.Arrays; import java.util.Objects; -/** - * SnippetResult - */ - +/** SnippetResult */ public class SnippetResult { public static final String SERIALIZED_NAME_VALUE = "value"; @@ -22,9 +17,7 @@ public class SnippetResult { @SerializedName(SERIALIZED_NAME_VALUE) private String value; - /** - * Indicates how well the attribute matched the search query. - */ + /** Indicates how well the attribute matched the search query. */ @JsonAdapter(MatchLevelEnum.Adapter.class) public enum MatchLevelEnum { NONE("none"), @@ -88,8 +81,9 @@ public SnippetResult value(String value) { /** * Markup text with occurrences highlighted. + * * @return value - **/ + */ @javax.annotation.Nullable @ApiModelProperty( example = "George Clooney...", @@ -110,8 +104,9 @@ public SnippetResult matchLevel(MatchLevelEnum matchLevel) { /** * Indicates how well the attribute matched the search query. + * * @return matchLevel - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Indicates how well the attribute matched the search query." @@ -158,8 +153,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 5324acde8d7..514cc6431b2 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 @@ -1,6 +1,5 @@ package com.algolia.model; -import com.algolia.model.SynonymHitHighlightResult; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -10,13 +9,10 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; -/** - * Synonym object. - */ +/** Synonym object. */ @ApiModel(description = "Synonym object.") public class SynonymHit { @@ -25,9 +21,7 @@ public class SynonymHit { @SerializedName(SERIALIZED_NAME_OBJECT_I_D) private String objectID; - /** - * Type of the synonym object. - */ + /** Type of the synonym object. */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { SYNONYM("synonym"), @@ -130,8 +124,9 @@ public SynonymHit objectID(String objectID) { /** * Unique identifier of the synonym object to be created or updated. + * * @return objectID - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( required = true, @@ -152,8 +147,9 @@ public SynonymHit type(TypeEnum type) { /** * Type of the synonym object. + * * @return type - **/ + */ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Type of the synonym object.") public TypeEnum getType() { @@ -179,8 +175,9 @@ public SynonymHit addSynonymsItem(String synonymsItem) { /** * Words or phrases to be considered equivalent. + * * @return synonyms - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Words or phrases to be considered equivalent.") public List getSynonyms() { @@ -198,8 +195,9 @@ public SynonymHit input(String input) { /** * Word or phrase to appear in query strings (for onewaysynonym). + * * @return input - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Word or phrase to appear in query strings (for onewaysynonym)." @@ -219,8 +217,9 @@ public SynonymHit word(String word) { /** * Word or phrase to appear in query strings (for altcorrection1 and altcorrection2). + * * @return word - **/ + */ @javax.annotation.Nullable @ApiModelProperty( value = "Word or phrase to appear in query strings (for altcorrection1 and altcorrection2)." @@ -248,8 +247,9 @@ public SynonymHit addCorrectionsItem(String correctionsItem) { /** * Words to be matched in records. + * * @return corrections - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Words to be matched in records.") public List getCorrections() { @@ -267,8 +267,9 @@ public SynonymHit placeholder(String placeholder) { /** * Token to be put inside records. + * * @return placeholder - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "Token to be put inside records.") public String getPlaceholder() { @@ -294,8 +295,9 @@ public SynonymHit addReplacementsItem(String replacementsItem) { /** * List of query words that will match the token. + * * @return replacements - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "List of query words that will match the token.") public List getReplacements() { @@ -313,8 +315,9 @@ public SynonymHit highlightResult(SynonymHitHighlightResult highlightResult) { /** * Get highlightResult + * * @return highlightResult - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public SynonymHitHighlightResult getHighlightResult() { @@ -392,8 +395,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 2e8909f225d..ccc0e886e3f 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,22 +1,13 @@ package com.algolia.model; -import com.algolia.model.HighlightResult; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.List; import java.util.Objects; -/** - * Highlighted results - */ +/** Highlighted results */ @ApiModel(description = "Highlighted results") public class SynonymHitHighlightResult { @@ -37,8 +28,9 @@ public SynonymHitHighlightResult type(HighlightResult type) { /** * Get type + * * @return type - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public HighlightResult getType() { @@ -66,8 +58,9 @@ public SynonymHitHighlightResult addSynonymsItem( /** * Get synonyms + * * @return synonyms - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") public List getSynonyms() { @@ -109,8 +102,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 f7903ac0e4f..03a68bf6c30 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,19 +1,11 @@ package com.algolia.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; 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.Arrays; import java.util.Objects; -/** - * A userID. - */ +/** A userID. */ @ApiModel(description = "A userID.") public class UserId { @@ -44,8 +36,9 @@ public UserId userID(String userID) { /** * userID of the user. + * * @return userID - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "user1", @@ -67,8 +60,9 @@ public UserId clusterName(String clusterName) { /** * Cluster on which the user is assigned. + * * @return clusterName - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "c1-test", @@ -90,8 +84,9 @@ public UserId nbRecords(Integer nbRecords) { /** * Number of records belonging to the user. + * * @return nbRecords - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "42", @@ -113,8 +108,9 @@ public UserId dataSize(Integer dataSize) { /** * Data size used by the user. + * * @return dataSize - **/ + */ @javax.annotation.Nonnull @ApiModelProperty( example = "0", @@ -170,8 +166,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(Object o) { if (o == null) { 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 e7b72fc2991..6dfcd37868d 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 @@ -5,8 +5,6 @@ import com.algolia.ApiException; import com.algolia.ApiResponse; import com.algolia.Pair; -import com.algolia.ProgressRequestBody; -import com.algolia.ProgressResponseBody; import com.algolia.model.AssignUserIdObject; import com.algolia.model.AssignUserIdResponse; import com.algolia.model.BatchAssignUserIdsObject; @@ -16,7 +14,6 @@ import com.algolia.model.ClearAllSynonymsResponse; import com.algolia.model.DeleteIndexResponse; import com.algolia.model.DeleteSynonymResponse; -import com.algolia.model.ErrorBase; import com.algolia.model.GetLogsResponse; import com.algolia.model.GetTaskResponse; import com.algolia.model.GetTopUserIdsResponse; @@ -42,7 +39,6 @@ import com.algolia.model.SynonymHit; import com.algolia.model.UserId; import com.google.gson.reflect.TypeToken; -import java.io.IOException; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; @@ -56,22 +52,23 @@ public SearchApi(String appId, String apiKey) { } /** - * Build call for assignUserId - * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdObject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for assignUserId + * + * @param xAlgoliaUserID userID to assign. (required) + * @param assignUserIdObject (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject, @@ -149,22 +146,26 @@ private okhttp3.Call assignUserIdValidateBeforeCall( } /** - * 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 AssignUserIdResponse - * @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. -
- */ + * 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 AssignUserIdResponse + * @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 AssignUserIdResponse assignUserId( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject @@ -177,22 +178,26 @@ public AssignUserIdResponse assignUserId( } /** - * 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<AssignUserIdResponse> - * @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. -
- */ + * 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<AssignUserIdResponse> + * @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 @@ -208,23 +213,26 @@ public ApiResponse assignUserIdWithHttpInfo( } /** - * Assign or Move userID (asynchronously) - * 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) - * @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. -
- */ + * Assign or Move userID (asynchronously) 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) + * @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( Object xAlgoliaUserID, AssignUserIdObject assignUserIdObject, @@ -242,22 +250,23 @@ public okhttp3.Call assignUserIdAsync( } /** - * Build call for batch - * @param indexName The index in which to perform the request. (required) - * @param batchObject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for batch + * + * @param indexName The index in which to perform the request. (required) + * @param batchObject (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( String indexName, BatchObject batchObject, @@ -329,22 +338,23 @@ private okhttp3.Call batchValidateBeforeCall( } /** - * - * Performs multiple write operations in a single API call. - * @param indexName The index in which to perform the request. (required) - * @param batchObject (required) - * @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. -
- */ + * Performs multiple write operations in a single API call. + * + * @param indexName The index in which to perform the request. (required) + * @param batchObject (required) + * @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, BatchObject batchObject) throws ApiException { ApiResponse localVarResp = batchWithHttpInfo( @@ -355,22 +365,23 @@ public BatchResponse batch(String indexName, BatchObject batchObject) } /** - * - * Performs multiple write operations in a single API call. - * @param indexName The index in which to perform the request. (required) - * @param batchObject (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. -
- */ + * Performs multiple write operations in a single API call. + * + * @param indexName The index in which to perform the request. (required) + * @param batchObject (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, BatchObject batchObject @@ -385,23 +396,23 @@ public ApiResponse batchWithHttpInfo( } /** - * (asynchronously) - * Performs multiple write operations in a single API call. - * @param indexName The index in which to perform the request. (required) - * @param batchObject (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. -
- */ + * (asynchronously) Performs multiple write operations in a single API call. + * + * @param indexName The index in which to perform the request. (required) + * @param batchObject (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 batchAsync( String indexName, BatchObject batchObject, @@ -418,22 +429,23 @@ public okhttp3.Call batchAsync( } /** - * Build call for batchAssignUserIds - * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsObject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for batchAssignUserIds + * + * @param xAlgoliaUserID userID to assign. (required) + * @param batchAssignUserIdsObject (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject, @@ -498,7 +510,8 @@ private okhttp3.Call batchAssignUserIdsValidateBeforeCall( // verify the required parameter 'batchAssignUserIdsObject' is set if (batchAssignUserIdsObject == null) { throw new ApiException( - "Missing the required parameter 'batchAssignUserIdsObject' when calling batchAssignUserIds(Async)" + "Missing the required parameter 'batchAssignUserIdsObject' when calling" + + " batchAssignUserIds(Async)" ); } @@ -511,22 +524,25 @@ private okhttp3.Call batchAssignUserIdsValidateBeforeCall( } /** - * 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 BatchAssignUserIdsResponse - * @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. -
- */ + * 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 BatchAssignUserIdsResponse + * @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 BatchAssignUserIdsResponse batchAssignUserIds( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject @@ -539,22 +555,25 @@ public BatchAssignUserIdsResponse batchAssignUserIds( } /** - * 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<BatchAssignUserIdsResponse> - * @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. -
- */ + * 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<BatchAssignUserIdsResponse> + * @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 @@ -570,23 +589,25 @@ public ApiResponse batchAssignUserIdsWithHttpInfo( } /** - * Batch assign userIDs (asynchronously) - * 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) - * @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. -
- */ + * Batch assign userIDs (asynchronously) 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) + * @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( Object xAlgoliaUserID, BatchAssignUserIdsObject batchAssignUserIdsObject, @@ -604,22 +625,24 @@ public okhttp3.Call batchAssignUserIdsAsync( } /** - * Build call for clearAllSynonyms - * @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) - * @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. -
- */ + * Build call for clearAllSynonyms + * + * @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) + * @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( String indexName, Boolean forwardToReplicas, @@ -653,6 +676,7 @@ public okhttp3.Call clearAllSynonymsCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -694,22 +718,24 @@ private okhttp3.Call clearAllSynonymsValidateBeforeCall( } /** - * 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 ClearAllSynonymsResponse - * @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. -
- */ + * 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 ClearAllSynonymsResponse + * @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 ClearAllSynonymsResponse clearAllSynonyms( String indexName, Boolean forwardToReplicas @@ -722,22 +748,24 @@ public ClearAllSynonymsResponse clearAllSynonyms( } /** - * 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<ClearAllSynonymsResponse> - * @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. -
- */ + * 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<ClearAllSynonymsResponse> + * @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 @@ -753,23 +781,24 @@ public ApiResponse clearAllSynonymsWithHttpInfo( } /** - * Clear all synonyms. (asynchronously) - * 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) - * @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. -
- */ + * Clear all synonyms. (asynchronously) 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) + * @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( String indexName, Boolean forwardToReplicas, @@ -787,21 +816,22 @@ public okhttp3.Call clearAllSynonymsAsync( } /** - * Build call for deleteIndex - * @param indexName The index in which to perform the request. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for deleteIndex + * + * @param indexName The index in which to perform the request. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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 @@ -828,6 +858,7 @@ public okhttp3.Call deleteIndexCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -864,21 +895,22 @@ private okhttp3.Call deleteIndexValidateBeforeCall( } /** - * Delete index. - * Delete an existing index. - * @param indexName The index in which to perform the request. (required) - * @return DeleteIndexResponse - * @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. -
- */ + * Delete index. Delete an existing index. + * + * @param indexName The index in which to perform the request. (required) + * @return DeleteIndexResponse + * @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 DeleteIndexResponse deleteIndex(String indexName) throws ApiException { ApiResponse localVarResp = deleteIndexWithHttpInfo( indexName @@ -887,21 +919,22 @@ public DeleteIndexResponse deleteIndex(String indexName) throws ApiException { } /** - * Delete index. - * Delete an existing index. - * @param indexName The index in which to perform the request. (required) - * @return ApiResponse<DeleteIndexResponse> - * @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. -
- */ + * Delete index. Delete an existing index. + * + * @param indexName The index in which to perform the request. (required) + * @return ApiResponse<DeleteIndexResponse> + * @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 { @@ -911,22 +944,22 @@ public ApiResponse deleteIndexWithHttpInfo( } /** - * Delete index. (asynchronously) - * Delete an existing index. - * @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. -
- */ + * Delete index. (asynchronously) Delete an existing index. + * + * @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 deleteIndexAsync( String indexName, final ApiCallback _callback @@ -941,23 +974,25 @@ public okhttp3.Call deleteIndexAsync( } /** - * Build call for deleteSynonym - * @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 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. -
- */ + * Build call for deleteSynonym + * + * @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 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( String indexName, String objectID, @@ -996,6 +1031,7 @@ public okhttp3.Call deleteSynonymCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1046,23 +1082,25 @@ private okhttp3.Call deleteSynonymValidateBeforeCall( } /** - * Delete synonym. - * 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 DeleteSynonymResponse - * @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. -
- */ + * Delete synonym. 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 DeleteSynonymResponse + * @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 DeleteSynonymResponse deleteSynonym( String indexName, String objectID, @@ -1077,23 +1115,25 @@ public DeleteSynonymResponse deleteSynonym( } /** - * Delete synonym. - * 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<DeleteSynonymResponse> - * @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. -
- */ + * Delete synonym. 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<DeleteSynonymResponse> + * @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 deleteSynonymWithHttpInfo( String indexName, String objectID, @@ -1111,24 +1151,26 @@ public ApiResponse deleteSynonymWithHttpInfo( } /** - * 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. -
- */ + * 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, @@ -1148,24 +1190,29 @@ public okhttp3.Call deleteSynonymAsync( } /** - * Build call for getLogs - * @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) - * @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. -
- */ + * Build call for getLogs + * + * @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) + * @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( Integer offset, Integer length, @@ -1207,6 +1254,7 @@ public okhttp3.Call getLogsCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1245,24 +1293,29 @@ private okhttp3.Call getLogsValidateBeforeCall( } /** - * - * 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 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. -
- */ + * 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 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, Integer length, @@ -1279,24 +1332,29 @@ public GetLogsResponse getLogs( } /** - * - * 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. -
- */ + * 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, @@ -1315,25 +1373,29 @@ public ApiResponse getLogsWithHttpInfo( } /** - * (asynchronously) - * 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) - * @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. -
- */ + * (asynchronously) 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) + * @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( Integer offset, Integer length, @@ -1354,21 +1416,22 @@ public okhttp3.Call getLogsAsync( } /** - * Build call for getSettings - * @param indexName The index in which to perform the request. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for getSettings + * + * @param indexName The index in which to perform the request. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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 @@ -1395,6 +1458,7 @@ public okhttp3.Call getSettingsCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1431,21 +1495,22 @@ private okhttp3.Call getSettingsValidateBeforeCall( } /** - * - * Retrieve settings of a given indexName. - * @param indexName The index in which to perform the request. (required) - * @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. -
- */ + * Retrieve settings of a given indexName. + * + * @param indexName The index in which to perform the request. (required) + * @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 { ApiResponse localVarResp = getSettingsWithHttpInfo( indexName @@ -1454,21 +1519,22 @@ public IndexSettings getSettings(String indexName) throws ApiException { } /** - * - * 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. -
- */ + * 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); @@ -1477,22 +1543,22 @@ public ApiResponse getSettingsWithHttpInfo(String indexName) } /** - * (asynchronously) - * Retrieve settings of a given indexName. - * @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. -
- */ + * (asynchronously) Retrieve settings of a given indexName. + * + * @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 getSettingsAsync( String indexName, final ApiCallback _callback @@ -1507,22 +1573,23 @@ public okhttp3.Call getSettingsAsync( } /** - * Build call for getSynonym - * @param indexName The index in which to perform the request. (required) - * @param objectID Unique identifier of an object. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for getSynonym + * + * @param indexName The index in which to perform the request. (required) + * @param objectID Unique identifier of an object. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( String indexName, String objectID, @@ -1554,6 +1621,7 @@ public okhttp3.Call getSynonymCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1598,22 +1666,23 @@ private okhttp3.Call getSynonymValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { ApiResponse localVarResp = getSynonymWithHttpInfo( @@ -1624,22 +1693,23 @@ public SynonymHit getSynonym(String indexName, String objectID) } /** - * 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. -
- */ + * 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 @@ -1654,23 +1724,23 @@ public ApiResponse getSynonymWithHttpInfo( } /** - * Get synonym. (asynchronously) - * 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) - * @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. -
- */ + * Get synonym. (asynchronously) 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) + * @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( String indexName, String objectID, @@ -1687,22 +1757,23 @@ public okhttp3.Call getSynonymAsync( } /** - * Build call for getTask - * @param indexName The index in which to perform the request. (required) - * @param taskID Unique identifier of an task. Numeric value (up to 64bits) (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for getTask + * + * @param indexName The index in which to perform the request. (required) + * @param taskID Unique identifier of an task. Numeric value (up to 64bits) (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( String indexName, Integer taskID, @@ -1734,6 +1805,7 @@ public okhttp3.Call getTaskCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1778,22 +1850,23 @@ private okhttp3.Call getTaskValidateBeforeCall( } /** - * - * 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 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. -
- */ + * 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 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 { ApiResponse localVarResp = getTaskWithHttpInfo( @@ -1804,22 +1877,23 @@ public GetTaskResponse getTask(String indexName, Integer taskID) } /** - * - * 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. -
- */ + * 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 @@ -1834,23 +1908,23 @@ public ApiResponse getTaskWithHttpInfo( } /** - * (asynchronously) - * 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) - * @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. -
- */ + * (asynchronously) 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) + * @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( String indexName, Integer taskID, @@ -1867,20 +1941,21 @@ public okhttp3.Call getTaskAsync( } /** - * Build call for getTopUserIds - * @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. -
- */ + * Build call for getTopUserIds + * + * @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) throws ApiException { Object localVarPostBody = null; @@ -1901,6 +1976,7 @@ public okhttp3.Call getTopUserIdsCall(final ApiCallback _callback) } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1929,40 +2005,48 @@ private okhttp3.Call getTopUserIdsValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { 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. -
- */ + * 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); @@ -1972,21 +2056,24 @@ public ApiResponse getTopUserIdsWithHttpInfo() } /** - * Get top userID (asynchronously) - * 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. - * @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. -
- */ + * Get top userID (asynchronously) 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. + * + * @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( final ApiCallback _callback ) throws ApiException { @@ -1998,21 +2085,22 @@ public okhttp3.Call getTopUserIdsAsync( } /** - * Build call for getUserId - * @param userID userID to assign. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for getUserId + * + * @param userID userID to assign. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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) throws ApiException { Object localVarPostBody = null; @@ -2037,6 +2125,7 @@ public okhttp3.Call getUserIdCall(Object userID, final ApiCallback _callback) } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2073,42 +2162,50 @@ private okhttp3.Call getUserIdValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { 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. -
- */ + * 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); @@ -2117,22 +2214,25 @@ public ApiResponse getUserIdWithHttpInfo(Object userID) } /** - * Get userID (asynchronously) - * 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) - * @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. -
- */ + * Get userID (asynchronously) 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) + * @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( Object userID, final ApiCallback _callback @@ -2144,21 +2244,22 @@ public okhttp3.Call getUserIdAsync( } /** - * Build call for hasPendingMappings - * @param getClusters (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for hasPendingMappings + * + * @param getClusters (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( Boolean getClusters, final ApiCallback _callback @@ -2187,6 +2288,7 @@ public okhttp3.Call hasPendingMappingsCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2216,21 +2318,26 @@ private okhttp3.Call hasPendingMappingsValidateBeforeCall( } /** - * 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 HasPendingMappingsResponse - * @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. -
- */ + * 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 HasPendingMappingsResponse + * @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 HasPendingMappingsResponse hasPendingMappings(Boolean getClusters) throws ApiException { ApiResponse localVarResp = hasPendingMappingsWithHttpInfo( @@ -2240,21 +2347,26 @@ public HasPendingMappingsResponse hasPendingMappings(Boolean getClusters) } /** - * 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<HasPendingMappingsResponse> - * @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. -
- */ + * 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<HasPendingMappingsResponse> + * @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 { @@ -2268,22 +2380,26 @@ public ApiResponse hasPendingMappingsWithHttpInfo( } /** - * 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 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) - * @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. -
- */ + * 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 + * 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) + * @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( Boolean getClusters, final ApiCallback _callback @@ -2299,20 +2415,21 @@ public okhttp3.Call hasPendingMappingsAsync( } /** - * Build call for listClusters - * @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. -
- */ + * Build call for listClusters + * + * @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) throws ApiException { Object localVarPostBody = null; @@ -2333,6 +2450,7 @@ public okhttp3.Call listClustersCall(final ApiCallback _callback) } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2361,40 +2479,44 @@ private okhttp3.Call listClustersValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { 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. -
- */ + * 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); @@ -2404,21 +2526,22 @@ public ApiResponse listClustersWithHttpInfo() } /** - * List clusters (asynchronously) - * 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. - * @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. -
- */ + * List clusters (asynchronously) 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. + * + * @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( final ApiCallback _callback ) throws ApiException { @@ -2430,21 +2553,24 @@ public okhttp3.Call listClustersAsync( } /** - * Build call for listIndices - * @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 _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. -
- */ + * Build call for listIndices + * + * @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 _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 @@ -2471,6 +2597,7 @@ public okhttp3.Call listIndicesCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2500,21 +2627,24 @@ private okhttp3.Call listIndicesValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { ApiResponse localVarResp = listIndicesWithHttpInfo( page @@ -2523,21 +2653,24 @@ public ListIndicesResponse listIndices(Integer page) throws ApiException { } /** - * 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. -
- */ + * 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); @@ -2546,22 +2679,24 @@ public ApiResponse listIndicesWithHttpInfo(Integer page) } /** - * List existing indexes. (asynchronously) - * 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) - * @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. -
- */ + * List existing indexes. (asynchronously) 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) + * @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( Integer page, final ApiCallback _callback @@ -2573,22 +2708,25 @@ public okhttp3.Call listIndicesAsync( } /** - * Build call for listUserIds - * @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) - * @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. -
- */ + * Build call for listUserIds + * + * @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) + * @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( Integer page, Integer hitsPerPage, @@ -2622,6 +2760,7 @@ public okhttp3.Call listUserIdsCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2652,22 +2791,28 @@ private okhttp3.Call listUserIdsValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { ApiResponse localVarResp = listUserIdsWithHttpInfo( @@ -2678,22 +2823,28 @@ public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage) } /** - * 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. -
- */ + * 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 @@ -2708,23 +2859,28 @@ public ApiResponse listUserIdsWithHttpInfo( } /** - * List userIDs (asynchronously) - * 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) - * @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. -
- */ + * List userIDs (asynchronously) 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) + * @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( Integer page, Integer hitsPerPage, @@ -2741,21 +2897,22 @@ public okhttp3.Call listUserIdsAsync( } /** - * Build call for multipleQueries - * @param multipleQueriesObject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for multipleQueries + * + * @param multipleQueriesObject (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( MultipleQueriesObject multipleQueriesObject, final ApiCallback _callback @@ -2805,7 +2962,8 @@ private okhttp3.Call multipleQueriesValidateBeforeCall( // verify the required parameter 'multipleQueriesObject' is set if (multipleQueriesObject == null) { throw new ApiException( - "Missing the required parameter 'multipleQueriesObject' when calling multipleQueries(Async)" + "Missing the required parameter 'multipleQueriesObject' when calling" + + " multipleQueries(Async)" ); } @@ -2817,21 +2975,22 @@ private okhttp3.Call multipleQueriesValidateBeforeCall( } /** - * - * 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. -
- */ + * 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 { @@ -2842,21 +3001,22 @@ public MultipleQueriesResponse multipleQueries( } /** - * - * Get search results for the given requests. - * @param multipleQueriesObject (required) - * @return ApiResponse<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. -
- */ + * Get search results for the given requests. + * + * @param multipleQueriesObject (required) + * @return ApiResponse<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 ApiResponse multipleQueriesWithHttpInfo( MultipleQueriesObject multipleQueriesObject ) throws ApiException { @@ -2870,22 +3030,22 @@ public ApiResponse multipleQueriesWithHttpInfo( } /** - * (asynchronously) - * Get search results for the given requests. - * @param multipleQueriesObject (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. -
- */ + * (asynchronously) Get search results for the given requests. + * + * @param multipleQueriesObject (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 multipleQueriesAsync( MultipleQueriesObject multipleQueriesObject, final ApiCallback _callback @@ -2901,22 +3061,23 @@ public okhttp3.Call multipleQueriesAsync( } /** - * Build call for operationIndex - * @param indexName The index in which to perform the request. (required) - * @param operationIndexObject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for operationIndex + * + * @param indexName The index in which to perform the request. (required) + * @param operationIndexObject (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( String indexName, OperationIndexObject operationIndexObject, @@ -2979,7 +3140,8 @@ private okhttp3.Call operationIndexValidateBeforeCall( // verify the required parameter 'operationIndexObject' is set if (operationIndexObject == null) { throw new ApiException( - "Missing the required parameter 'operationIndexObject' when calling operationIndex(Async)" + "Missing the required parameter 'operationIndexObject' when calling" + + " operationIndex(Async)" ); } @@ -2992,22 +3154,23 @@ private okhttp3.Call operationIndexValidateBeforeCall( } /** - * 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 OperationIndexResponse - * @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. -
- */ + * 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 OperationIndexResponse + * @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 OperationIndexResponse operationIndex( String indexName, OperationIndexObject operationIndexObject @@ -3020,22 +3183,23 @@ public OperationIndexResponse operationIndex( } /** - * 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<OperationIndexResponse> - * @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. -
- */ + * 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<OperationIndexResponse> + * @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 @@ -3051,23 +3215,23 @@ public ApiResponse operationIndexWithHttpInfo( } /** - * Copy/move index. (asynchronously) - * Peforms a copy or a move operation on a index. - * @param indexName The index in which to perform the request. (required) - * @param operationIndexObject (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. -
- */ + * Copy/move index. (asynchronously) Peforms a copy or a move operation on a index. + * + * @param indexName The index in which to perform the request. (required) + * @param operationIndexObject (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 operationIndexAsync( String indexName, OperationIndexObject operationIndexObject, @@ -3085,21 +3249,22 @@ public okhttp3.Call operationIndexAsync( } /** - * Build call for removeUserId - * @param userID userID to assign. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for removeUserId + * + * @param userID userID to assign. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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 @@ -3126,6 +3291,7 @@ public okhttp3.Call removeUserIdCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3162,21 +3328,23 @@ private okhttp3.Call removeUserIdValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { ApiResponse localVarResp = removeUserIdWithHttpInfo( userID @@ -3185,21 +3353,23 @@ public RemoveUserIdResponse removeUserId(Object userID) throws ApiException { } /** - * 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. -
- */ + * 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 { @@ -3210,22 +3380,24 @@ public ApiResponse removeUserIdWithHttpInfo( } /** - * Remove userID (asynchronously) - * 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) - * @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. -
- */ + * Remove userID (asynchronously) 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) + * @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( Object userID, final ApiCallback _callback @@ -3241,22 +3413,23 @@ public okhttp3.Call removeUserIdAsync( } /** - * Build call for saveObject - * @param indexName The index in which to perform the request. (required) - * @param requestBody The Algolia object. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for saveObject + * + * @param indexName The index in which to perform the request. (required) + * @param requestBody The Algolia object. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( String indexName, Map requestBody, @@ -3332,22 +3505,23 @@ private okhttp3.Call saveObjectValidateBeforeCall( } /** - * - * 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 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. -
- */ + * 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 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 @@ -3360,22 +3534,23 @@ public SaveObjectResponse saveObject( } /** - * - * 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. -
- */ + * 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 @@ -3390,23 +3565,23 @@ public ApiResponse saveObjectWithHttpInfo( } /** - * (asynchronously) - * 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) - * @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. -
- */ + * (asynchronously) 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) + * @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( String indexName, Map requestBody, @@ -3423,24 +3598,26 @@ public okhttp3.Call saveObjectAsync( } /** - * Build call for saveSynonym - * @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) - * @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. -
- */ + * Build call for saveSynonym + * + * @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) + * @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( String indexName, String objectID, @@ -3539,24 +3716,27 @@ private okhttp3.Call saveSynonymValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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, String objectID, @@ -3573,24 +3753,27 @@ public SaveSynonymResponse saveSynonym( } /** - * 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. -
- */ + * 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, @@ -3609,25 +3792,27 @@ public ApiResponse saveSynonymWithHttpInfo( } /** - * Save synonym. (asynchronously) - * 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) - * @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. -
- */ + * Save synonym. (asynchronously) 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) + * @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( String indexName, String objectID, @@ -3648,24 +3833,27 @@ public okhttp3.Call saveSynonymAsync( } /** - * Build call for saveSynonyms - * @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) - * @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. -
- */ + * Build call for saveSynonyms + * + * @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) + * @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( String indexName, List synonymHit, @@ -3759,24 +3947,28 @@ private okhttp3.Call saveSynonymsValidateBeforeCall( } /** - * 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 SaveSynonymsResponse - * @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. -
- */ + * 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 SaveSynonymsResponse + * @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 SaveSynonymsResponse saveSynonyms( String indexName, List synonymHit, @@ -3793,24 +3985,28 @@ public SaveSynonymsResponse saveSynonyms( } /** - * 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<SaveSynonymsResponse> - * @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. -
- */ + * 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<SaveSynonymsResponse> + * @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( String indexName, List synonymHit, @@ -3830,25 +4026,28 @@ public ApiResponse saveSynonymsWithHttpInfo( } /** - * Save a batch of synonyms. (asynchronously) - * 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) - * @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. -
- */ + * Save a batch of synonyms. (asynchronously) 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) + * @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( String indexName, List synonymHit, @@ -3870,22 +4069,23 @@ public okhttp3.Call saveSynonymsAsync( } /** - * Build call for search - * @param indexName The index in which to perform the request. (required) - * @param searchParams (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for search + * + * @param indexName The index in which to perform the request. (required) + * @param searchParams (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( String indexName, SearchParams searchParams, @@ -3957,22 +4157,23 @@ private okhttp3.Call searchValidateBeforeCall( } /** - * - * Get search results. - * @param indexName The index in which to perform the request. (required) - * @param searchParams (required) - * @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. -
- */ + * Get search results. + * + * @param indexName The index in which to perform the request. (required) + * @param searchParams (required) + * @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 { ApiResponse localVarResp = searchWithHttpInfo( @@ -3983,22 +4184,23 @@ public SearchResponse search(String indexName, SearchParams searchParams) } /** - * - * 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. -
- */ + * 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 @@ -4013,23 +4215,23 @@ public ApiResponse searchWithHttpInfo( } /** - * (asynchronously) - * Get search results. - * @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. -
- */ + * (asynchronously) Get search results. + * + * @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 searchAsync( String indexName, SearchParams searchParams, @@ -4046,25 +4248,28 @@ public okhttp3.Call searchAsync( } /** - * Build call for searchSynonyms - * @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) - * @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. -
- */ + * Build call for searchSynonyms + * + * @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) + * @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( String indexName, String query, @@ -4113,6 +4318,7 @@ public okhttp3.Call searchSynonymsCall( } final String[] localVarContentTypes = {}; + final String localVarContentType = this.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4160,25 +4366,29 @@ private okhttp3.Call searchSynonymsValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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, String query, @@ -4197,25 +4407,29 @@ public SearchSynonymsResponse searchSynonyms( } /** - * 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. -
- */ + * 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, @@ -4237,26 +4451,29 @@ public ApiResponse searchSynonymsWithHttpInfo( } /** - * Get all synonyms that match a query. (asynchronously) - * 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) - * @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. -
- */ + * Get all synonyms that match a query. (asynchronously) 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) + * @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( String indexName, String query, @@ -4280,21 +4497,22 @@ public okhttp3.Call searchSynonymsAsync( } /** - * Build call for searchUserIds - * @param searchUserIdsObject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
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. -
- */ + * Build call for searchUserIds + * + * @param searchUserIdsObject (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
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( SearchUserIdsObject searchUserIdsObject, final ApiCallback _callback @@ -4356,21 +4574,28 @@ private okhttp3.Call searchUserIdsValidateBeforeCall( } /** - * 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 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. -
- */ + * 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 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 { @@ -4381,21 +4606,28 @@ public SearchUserIdsResponse searchUserIds( } /** - * 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. -
- */ + * 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 { @@ -4409,22 +4641,29 @@ public ApiResponse searchUserIdsWithHttpInfo( } /** - * 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 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) - * @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. -
- */ + * 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 + * 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) + * @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( SearchUserIdsObject searchUserIdsObject, final ApiCallback _callback @@ -4440,23 +4679,25 @@ public okhttp3.Call searchUserIdsAsync( } /** - * Build call for setSettings - * @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) - * @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. -
- */ + * Build call for setSettings + * + * @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) + * @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( String indexName, IndexSettings indexSettings, @@ -4541,23 +4782,26 @@ private okhttp3.Call setSettingsValidateBeforeCall( } /** - * - * 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 SetSettingsResponse - * @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. -
- */ + * 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 SetSettingsResponse + * @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 SetSettingsResponse setSettings( String indexName, IndexSettings indexSettings, @@ -4572,23 +4816,26 @@ public SetSettingsResponse setSettings( } /** - * - * 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<SetSettingsResponse> - * @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. -
- */ + * 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<SetSettingsResponse> + * @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, @@ -4605,24 +4852,27 @@ public ApiResponse setSettingsWithHttpInfo( } /** - * (asynchronously) - * 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) - * @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. -
- */ + * (asynchronously) 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) + * @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( String indexName, IndexSettings indexSettings, From 8c626dd54888badd93a3e70e5f220d964338a434 Mon Sep 17 00:00:00 2001 From: Maxence Maire Date: Thu, 16 Dec 2021 11:40:31 +0100 Subject: [PATCH 27/28] feat: add missing required properties in searchUserId method, add description to highlightResult object --- specs/search/common/schemas/Record.yml | 1 + specs/search/paths/multiclusters/searchUserIds.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/specs/search/common/schemas/Record.yml b/specs/search/common/schemas/Record.yml index f11c0eb5cf5..184b3f7adf7 100644 --- a/specs/search/common/schemas/Record.yml +++ b/specs/search/common/schemas/Record.yml @@ -19,6 +19,7 @@ record: # Props highlightResult: type: object + description: Highlighted attributes. additionalProperties: false properties: value: diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index ffff280c2a3..ba8d8aab88d 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -66,6 +66,16 @@ post: $ref: '../../common/schemas/Record.yml#/highlightResult' clusterName: $ref: '../../common/schemas/Record.yml#/highlightResult' + required: + - userID + - clusterName + required: + - userID + - clusterName + - nbRecords + - dataSize + - objectID + - _highlightResult nbHits: $ref: '../../common/schemas/SearchResponse.yml#/baseSearchResponse/properties/nbHits' page: From 4198939406f56c75623b19a0faec4f74c8eca352 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Thu, 16 Dec 2021 14:05:36 +0100 Subject: [PATCH 28/28] run yarn generate --- .../com/algolia/model/HighlightResult.java | 4 ++- .../SearchUserIdsResponseHighlightResult.java | 8 ++--- .../model/SearchUserIdsResponseHits.java | 34 +++++++++++++------ .../client-search/model/highlightResult.ts | 3 ++ .../searchUserIdsResponseHighlightResult.ts | 4 +-- .../model/searchUserIdsResponseHits.ts | 12 +++---- .../recommend/model/highlightResult.ts | 3 ++ 7 files changed, 44 insertions(+), 24 deletions(-) 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 7bb3d2dbbee..606dc0a201d 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,13 +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; -/** HighlightResult */ +/** Highlighted attributes. */ +@ApiModel(description = "Highlighted attributes.") public class HighlightResult { public static final String SERIALIZED_NAME_VALUE = "value"; 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 a306783eb5c..09651a2ea8f 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 @@ -27,8 +27,8 @@ public SearchUserIdsResponseHighlightResult userID(HighlightResult userID) { * * @return userID */ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public HighlightResult getUserID() { return userID; } @@ -49,8 +49,8 @@ public SearchUserIdsResponseHighlightResult clusterName( * * @return clusterName */ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + @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 33b08d8f726..36d76eac7c7 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 @@ -48,8 +48,8 @@ public SearchUserIdsResponseHits userID(UserId userID) { * * @return userID */ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public UserId getUserID() { return userID; } @@ -68,8 +68,12 @@ public SearchUserIdsResponseHits clusterName(String clusterName) { * * @return clusterName */ - @javax.annotation.Nullable - @ApiModelProperty(example = "c11-test", value = "Name of the cluster.") + @javax.annotation.Nonnull + @ApiModelProperty( + example = "c11-test", + required = true, + value = "Name of the cluster." + ) public String getClusterName() { return clusterName; } @@ -88,8 +92,12 @@ public SearchUserIdsResponseHits nbRecords(Integer nbRecords) { * * @return nbRecords */ - @javax.annotation.Nullable - @ApiModelProperty(example = "3", value = "Number of records in the cluster.") + @javax.annotation.Nonnull + @ApiModelProperty( + example = "3", + required = true, + value = "Number of records in the cluster." + ) public Integer getNbRecords() { return nbRecords; } @@ -108,9 +116,10 @@ public SearchUserIdsResponseHits dataSize(Integer dataSize) { * * @return dataSize */ - @javax.annotation.Nullable + @javax.annotation.Nonnull @ApiModelProperty( example = "481", + required = true, value = "Data size taken by all the users assigned to the cluster." ) public Integer getDataSize() { @@ -131,8 +140,11 @@ public SearchUserIdsResponseHits objectID(String objectID) { * * @return objectID */ - @javax.annotation.Nullable - @ApiModelProperty(value = "userID of the requested user. Same as userID.") + @javax.annotation.Nonnull + @ApiModelProperty( + required = true, + value = "userID of the requested user. Same as userID." + ) public String getObjectID() { return objectID; } @@ -153,8 +165,8 @@ public SearchUserIdsResponseHits highlightResult( * * @return highlightResult */ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public SearchUserIdsResponseHighlightResult getHighlightResult() { return highlightResult; } diff --git a/clients/algoliasearch-client-javascript/client-search/model/highlightResult.ts b/clients/algoliasearch-client-javascript/client-search/model/highlightResult.ts index 0946b038a96..e184f528caa 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/highlightResult.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/highlightResult.ts @@ -1,3 +1,6 @@ +/** + * Highlighted attributes. + */ export type HighlightResult = { /** * Markup text with occurrences highlighted. diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHighlightResult.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHighlightResult.ts index f9a38bf8d05..6f575186dfd 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHighlightResult.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHighlightResult.ts @@ -1,6 +1,6 @@ import type { HighlightResult } from './highlightResult'; export type SearchUserIdsResponseHighlightResult = { - userID?: HighlightResult; - clusterName?: HighlightResult; + userID: HighlightResult; + clusterName: HighlightResult; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts index d73ebe09e66..e97dd8c0a68 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsResponseHits.ts @@ -2,22 +2,22 @@ import type { SearchUserIdsResponseHighlightResult } from './searchUserIdsRespon import type { UserId } from './userId'; export type SearchUserIdsResponseHits = { - userID?: UserId; + userID: UserId; /** * Name of the cluster. */ - clusterName?: string; + clusterName: string; /** * Number of records in the cluster. */ - nbRecords?: number; + nbRecords: number; /** * Data size taken by all the users assigned to the cluster. */ - dataSize?: number; + dataSize: number; /** * UserID of the requested user. Same as userID. */ - objectID?: string; - _highlightResult?: SearchUserIdsResponseHighlightResult; + objectID: string; + _highlightResult: SearchUserIdsResponseHighlightResult; }; diff --git a/clients/algoliasearch-client-javascript/recommend/model/highlightResult.ts b/clients/algoliasearch-client-javascript/recommend/model/highlightResult.ts index 0946b038a96..e184f528caa 100644 --- a/clients/algoliasearch-client-javascript/recommend/model/highlightResult.ts +++ b/clients/algoliasearch-client-javascript/recommend/model/highlightResult.ts @@ -1,3 +1,6 @@ +/** + * Highlighted attributes. + */ export type HighlightResult = { /** * Markup text with occurrences highlighted.