Skip to content

Commit f8a7722

Browse files
algolia-botclemfromspaceshortcuts
committed
chore: generated code for commit 362cd6b. [skip ci]
Co-authored-by: Clément Denoix <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 362cd6b commit f8a7722

File tree

16 files changed

+944
-137
lines changed

16 files changed

+944
-137
lines changed

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,15 +1291,15 @@ public CompletableFuture<DeleteApiKeyResponse> deleteApiKeyAsync(String key) thr
12911291
* empty filters or a query.
12921292
*
12931293
* @param indexName The index in which to perform the request. (required)
1294-
* @param searchParams (required)
1294+
* @param deleteByParams (required)
12951295
* @param requestOptions The requestOptions to send along with the query, they will be merged with
12961296
* the transporter requestOptions.
12971297
* @return DeletedAtResponse
12981298
* @throws AlgoliaRuntimeException If it fails to process the API call
12991299
*/
1300-
public DeletedAtResponse deleteBy(String indexName, SearchParams searchParams, RequestOptions requestOptions)
1300+
public DeletedAtResponse deleteBy(String indexName, DeleteByParams deleteByParams, RequestOptions requestOptions)
13011301
throws AlgoliaRuntimeException {
1302-
return LaunderThrowable.await(deleteByAsync(indexName, searchParams, requestOptions));
1302+
return LaunderThrowable.await(deleteByAsync(indexName, deleteByParams, requestOptions));
13031303
}
13041304

13051305
/**
@@ -1308,12 +1308,12 @@ public DeletedAtResponse deleteBy(String indexName, SearchParams searchParams, R
13081308
* empty filters or a query.
13091309
*
13101310
* @param indexName The index in which to perform the request. (required)
1311-
* @param searchParams (required)
1311+
* @param deleteByParams (required)
13121312
* @return DeletedAtResponse
13131313
* @throws AlgoliaRuntimeException If it fails to process the API call
13141314
*/
1315-
public DeletedAtResponse deleteBy(String indexName, SearchParams searchParams) throws AlgoliaRuntimeException {
1316-
return this.deleteBy(indexName, searchParams, null);
1315+
public DeletedAtResponse deleteBy(String indexName, DeleteByParams deleteByParams) throws AlgoliaRuntimeException {
1316+
return this.deleteBy(indexName, deleteByParams, null);
13171317
}
13181318

13191319
/**
@@ -1322,23 +1322,23 @@ public DeletedAtResponse deleteBy(String indexName, SearchParams searchParams) t
13221322
* queries). It doesn&#39;t accept empty filters or a query.
13231323
*
13241324
* @param indexName The index in which to perform the request. (required)
1325-
* @param searchParams (required)
1325+
* @param deleteByParams (required)
13261326
* @param requestOptions The requestOptions to send along with the query, they will be merged with
13271327
* the transporter requestOptions.
13281328
* @return CompletableFuture<DeletedAtResponse> The awaitable future
13291329
* @throws AlgoliaRuntimeException If it fails to process the API call
13301330
*/
1331-
public CompletableFuture<DeletedAtResponse> deleteByAsync(String indexName, SearchParams searchParams, RequestOptions requestOptions)
1331+
public CompletableFuture<DeletedAtResponse> deleteByAsync(String indexName, DeleteByParams deleteByParams, RequestOptions requestOptions)
13321332
throws AlgoliaRuntimeException {
13331333
if (indexName == null) {
13341334
throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteBy`.");
13351335
}
13361336

1337-
if (searchParams == null) {
1338-
throw new AlgoliaRuntimeException("Parameter `searchParams` is required when calling `deleteBy`.");
1337+
if (deleteByParams == null) {
1338+
throw new AlgoliaRuntimeException("Parameter `deleteByParams` is required when calling `deleteBy`.");
13391339
}
13401340

1341-
Object bodyObj = searchParams;
1341+
Object bodyObj = deleteByParams;
13421342

13431343
// create path and map variables
13441344
String requestPath = "/1/indexes/{indexName}/deleteByQuery".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString()));
@@ -1356,12 +1356,13 @@ public CompletableFuture<DeletedAtResponse> deleteByAsync(String indexName, Sear
13561356
* queries). It doesn&#39;t accept empty filters or a query.
13571357
*
13581358
* @param indexName The index in which to perform the request. (required)
1359-
* @param searchParams (required)
1359+
* @param deleteByParams (required)
13601360
* @return CompletableFuture<DeletedAtResponse> The awaitable future
13611361
* @throws AlgoliaRuntimeException If it fails to process the API call
13621362
*/
1363-
public CompletableFuture<DeletedAtResponse> deleteByAsync(String indexName, SearchParams searchParams) throws AlgoliaRuntimeException {
1364-
return this.deleteByAsync(indexName, searchParams, null);
1363+
public CompletableFuture<DeletedAtResponse> deleteByAsync(String indexName, DeleteByParams deleteByParams)
1364+
throws AlgoliaRuntimeException {
1365+
return this.deleteByAsync(indexName, deleteByParams, null);
13651366
}
13661367

13671368
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
// This file is generated, manual changes will be lost - read more on
2+
// https://github.com/algolia/api-clients-automation.
3+
4+
package com.algolia.model.search;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import java.util.ArrayList;
8+
import java.util.List;
9+
import java.util.Objects;
10+
11+
/** DeleteByParams */
12+
public class DeleteByParams {
13+
14+
@JsonProperty("facetFilters")
15+
private FacetFilters facetFilters;
16+
17+
@JsonProperty("filters")
18+
private String filters;
19+
20+
@JsonProperty("numericFilters")
21+
private NumericFilters numericFilters;
22+
23+
@JsonProperty("tagFilters")
24+
private TagFilters tagFilters;
25+
26+
@JsonProperty("aroundLatLng")
27+
private String aroundLatLng;
28+
29+
@JsonProperty("aroundRadius")
30+
private AroundRadius aroundRadius;
31+
32+
@JsonProperty("insideBoundingBox")
33+
private List<Double> insideBoundingBox;
34+
35+
@JsonProperty("insidePolygon")
36+
private List<Double> insidePolygon;
37+
38+
public DeleteByParams setFacetFilters(FacetFilters facetFilters) {
39+
this.facetFilters = facetFilters;
40+
return this;
41+
}
42+
43+
/**
44+
* Get facetFilters
45+
*
46+
* @return facetFilters
47+
*/
48+
@javax.annotation.Nullable
49+
public FacetFilters getFacetFilters() {
50+
return facetFilters;
51+
}
52+
53+
public DeleteByParams setFilters(String filters) {
54+
this.filters = filters;
55+
return this;
56+
}
57+
58+
/**
59+
* Filter the query with numeric, facet and/or tag filters.
60+
*
61+
* @return filters
62+
*/
63+
@javax.annotation.Nullable
64+
public String getFilters() {
65+
return filters;
66+
}
67+
68+
public DeleteByParams setNumericFilters(NumericFilters numericFilters) {
69+
this.numericFilters = numericFilters;
70+
return this;
71+
}
72+
73+
/**
74+
* Get numericFilters
75+
*
76+
* @return numericFilters
77+
*/
78+
@javax.annotation.Nullable
79+
public NumericFilters getNumericFilters() {
80+
return numericFilters;
81+
}
82+
83+
public DeleteByParams setTagFilters(TagFilters tagFilters) {
84+
this.tagFilters = tagFilters;
85+
return this;
86+
}
87+
88+
/**
89+
* Get tagFilters
90+
*
91+
* @return tagFilters
92+
*/
93+
@javax.annotation.Nullable
94+
public TagFilters getTagFilters() {
95+
return tagFilters;
96+
}
97+
98+
public DeleteByParams setAroundLatLng(String aroundLatLng) {
99+
this.aroundLatLng = aroundLatLng;
100+
return this;
101+
}
102+
103+
/**
104+
* Search for entries around a central geolocation, enabling a geo search within a circular area.
105+
*
106+
* @return aroundLatLng
107+
*/
108+
@javax.annotation.Nullable
109+
public String getAroundLatLng() {
110+
return aroundLatLng;
111+
}
112+
113+
public DeleteByParams setAroundRadius(AroundRadius aroundRadius) {
114+
this.aroundRadius = aroundRadius;
115+
return this;
116+
}
117+
118+
/**
119+
* Get aroundRadius
120+
*
121+
* @return aroundRadius
122+
*/
123+
@javax.annotation.Nullable
124+
public AroundRadius getAroundRadius() {
125+
return aroundRadius;
126+
}
127+
128+
public DeleteByParams setInsideBoundingBox(List<Double> insideBoundingBox) {
129+
this.insideBoundingBox = insideBoundingBox;
130+
return this;
131+
}
132+
133+
public DeleteByParams addInsideBoundingBox(Double insideBoundingBoxItem) {
134+
if (this.insideBoundingBox == null) {
135+
this.insideBoundingBox = new ArrayList<>();
136+
}
137+
this.insideBoundingBox.add(insideBoundingBoxItem);
138+
return this;
139+
}
140+
141+
/**
142+
* Search inside a rectangular area (in geo coordinates).
143+
*
144+
* @return insideBoundingBox
145+
*/
146+
@javax.annotation.Nullable
147+
public List<Double> getInsideBoundingBox() {
148+
return insideBoundingBox;
149+
}
150+
151+
public DeleteByParams setInsidePolygon(List<Double> insidePolygon) {
152+
this.insidePolygon = insidePolygon;
153+
return this;
154+
}
155+
156+
public DeleteByParams addInsidePolygon(Double insidePolygonItem) {
157+
if (this.insidePolygon == null) {
158+
this.insidePolygon = new ArrayList<>();
159+
}
160+
this.insidePolygon.add(insidePolygonItem);
161+
return this;
162+
}
163+
164+
/**
165+
* Search inside a polygon (in geo coordinates).
166+
*
167+
* @return insidePolygon
168+
*/
169+
@javax.annotation.Nullable
170+
public List<Double> getInsidePolygon() {
171+
return insidePolygon;
172+
}
173+
174+
@Override
175+
public boolean equals(Object o) {
176+
if (this == o) {
177+
return true;
178+
}
179+
if (o == null || getClass() != o.getClass()) {
180+
return false;
181+
}
182+
DeleteByParams deleteByParams = (DeleteByParams) o;
183+
return (
184+
Objects.equals(this.facetFilters, deleteByParams.facetFilters) &&
185+
Objects.equals(this.filters, deleteByParams.filters) &&
186+
Objects.equals(this.numericFilters, deleteByParams.numericFilters) &&
187+
Objects.equals(this.tagFilters, deleteByParams.tagFilters) &&
188+
Objects.equals(this.aroundLatLng, deleteByParams.aroundLatLng) &&
189+
Objects.equals(this.aroundRadius, deleteByParams.aroundRadius) &&
190+
Objects.equals(this.insideBoundingBox, deleteByParams.insideBoundingBox) &&
191+
Objects.equals(this.insidePolygon, deleteByParams.insidePolygon)
192+
);
193+
}
194+
195+
@Override
196+
public int hashCode() {
197+
return Objects.hash(facetFilters, filters, numericFilters, tagFilters, aroundLatLng, aroundRadius, insideBoundingBox, insidePolygon);
198+
}
199+
200+
@Override
201+
public String toString() {
202+
StringBuilder sb = new StringBuilder();
203+
sb.append("class DeleteByParams {\n");
204+
sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n");
205+
sb.append(" filters: ").append(toIndentedString(filters)).append("\n");
206+
sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n");
207+
sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n");
208+
sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n");
209+
sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n");
210+
sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n");
211+
sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n");
212+
sb.append("}");
213+
return sb.toString();
214+
}
215+
216+
/**
217+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
218+
*/
219+
private String toIndentedString(Object o) {
220+
if (o == null) {
221+
return "null";
222+
}
223+
return o.toString().replace("\n", "\n ");
224+
}
225+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
import type { AroundRadius } from './aroundRadius';
4+
import type { FacetFilters } from './facetFilters';
5+
import type { NumericFilters } from './numericFilters';
6+
import type { TagFilters } from './tagFilters';
7+
8+
export type DeleteByParams = {
9+
facetFilters?: FacetFilters;
10+
11+
/**
12+
* Filter the query with numeric, facet and/or tag filters.
13+
*/
14+
filters?: string;
15+
16+
numericFilters?: NumericFilters;
17+
18+
tagFilters?: TagFilters;
19+
20+
/**
21+
* Search for entries around a central geolocation, enabling a geo search within a circular area.
22+
*/
23+
aroundLatLng?: string;
24+
25+
aroundRadius?: AroundRadius;
26+
27+
/**
28+
* Search inside a rectangular area (in geo coordinates).
29+
*/
30+
insideBoundingBox?: number[];
31+
32+
/**
33+
* Search inside a polygon (in geo coordinates).
34+
*/
35+
insidePolygon?: number[];
36+
};

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export * from './consequenceParams';
2929
export * from './consequenceQuery';
3030
export * from './consequenceQueryObject';
3131
export * from './cursor';
32+
export * from './deleteByParams';
3233
export * from './dictionaryAction';
3334
export * from './dictionaryEntry';
3435
export * from './dictionaryEntryState';

clients/algoliasearch-client-javascript/packages/client-search/model/clientMethodProps.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
99
import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
1010
import type { BatchWriteParams } from './batchWriteParams';
1111
import type { BrowseParams } from './browseParams';
12+
import type { DeleteByParams } from './deleteByParams';
1213
import type { DictionaryType } from './dictionaryType';
1314
import type { IndexSettings } from './indexSettings';
1415
import type { LogType } from './logType';
@@ -169,7 +170,7 @@ export type DeleteByProps = {
169170
* The index in which to perform the request.
170171
*/
171172
indexName: string;
172-
searchParams: SearchParams;
173+
deleteByParams: DeleteByParams;
173174
};
174175

175176
/**

0 commit comments

Comments
 (0)