@@ -189,6 +189,145 @@ public CompletableFuture<Object> delAsync(String path) throws AlgoliaRuntimeExce
189
189
return this .delAsync (path , null , null );
190
190
}
191
191
192
+ /**
193
+ * Delete all data and predictions associated with an authenticated user (userID) or an anonymous
194
+ * user (cookieID, sessionID).
195
+ *
196
+ * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users
197
+ * (visitors). (required)
198
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
199
+ * the transporter requestOptions.
200
+ * @return DeleteUserProfileResponse
201
+ * @throws AlgoliaRuntimeException If it fails to process the API call
202
+ */
203
+ public DeleteUserProfileResponse deleteUserProfile (String userID , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
204
+ return LaunderThrowable .await (deleteUserProfileAsync (userID , requestOptions ));
205
+ }
206
+
207
+ /**
208
+ * Delete all data and predictions associated with an authenticated user (userID) or an anonymous
209
+ * user (cookieID, sessionID).
210
+ *
211
+ * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users
212
+ * (visitors). (required)
213
+ * @return DeleteUserProfileResponse
214
+ * @throws AlgoliaRuntimeException If it fails to process the API call
215
+ */
216
+ public DeleteUserProfileResponse deleteUserProfile (String userID ) throws AlgoliaRuntimeException {
217
+ return this .deleteUserProfile (userID , null );
218
+ }
219
+
220
+ /**
221
+ * (asynchronously) Delete all data and predictions associated with an authenticated user (userID)
222
+ * or an anonymous user (cookieID, sessionID).
223
+ *
224
+ * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users
225
+ * (visitors). (required)
226
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
227
+ * the transporter requestOptions.
228
+ * @return CompletableFuture<DeleteUserProfileResponse> The awaitable future
229
+ * @throws AlgoliaRuntimeException If it fails to process the API call
230
+ */
231
+ public CompletableFuture <DeleteUserProfileResponse > deleteUserProfileAsync (String userID , RequestOptions requestOptions )
232
+ throws AlgoliaRuntimeException {
233
+ if (userID == null ) {
234
+ throw new AlgoliaRuntimeException ("Parameter `userID` is required when calling `deleteUserProfile`." );
235
+ }
236
+
237
+ Object bodyObj = null ;
238
+
239
+ // create path and map variables
240
+ String requestPath = "/1/users/{userID}" .replaceAll ("\\ {userID\\ }" , this .escapeString (userID .toString ()));
241
+
242
+ Map <String , Object > queryParameters = new HashMap <String , Object >();
243
+ Map <String , String > headers = new HashMap <String , String >();
244
+
245
+ Call call = this .buildCall (requestPath , "DELETE" , queryParameters , bodyObj , headers , requestOptions , false );
246
+ return this .executeAsync (call , new TypeReference <DeleteUserProfileResponse >() {});
247
+ }
248
+
249
+ /**
250
+ * (asynchronously) Delete all data and predictions associated with an authenticated user (userID)
251
+ * or an anonymous user (cookieID, sessionID).
252
+ *
253
+ * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users
254
+ * (visitors). (required)
255
+ * @return CompletableFuture<DeleteUserProfileResponse> The awaitable future
256
+ * @throws AlgoliaRuntimeException If it fails to process the API call
257
+ */
258
+ public CompletableFuture <DeleteUserProfileResponse > deleteUserProfileAsync (String userID ) throws AlgoliaRuntimeException {
259
+ return this .deleteUserProfileAsync (userID , null );
260
+ }
261
+
262
+ /**
263
+ * Get all users with predictions in the provided application.
264
+ *
265
+ * @param fetchAllUserProfilesParams (required)
266
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
267
+ * the transporter requestOptions.
268
+ * @return FetchAllUserProfilesResponse
269
+ * @throws AlgoliaRuntimeException If it fails to process the API call
270
+ */
271
+ public FetchAllUserProfilesResponse fetchAllUserProfiles (
272
+ FetchAllUserProfilesParams fetchAllUserProfilesParams ,
273
+ RequestOptions requestOptions
274
+ ) throws AlgoliaRuntimeException {
275
+ return LaunderThrowable .await (fetchAllUserProfilesAsync (fetchAllUserProfilesParams , requestOptions ));
276
+ }
277
+
278
+ /**
279
+ * Get all users with predictions in the provided application.
280
+ *
281
+ * @param fetchAllUserProfilesParams (required)
282
+ * @return FetchAllUserProfilesResponse
283
+ * @throws AlgoliaRuntimeException If it fails to process the API call
284
+ */
285
+ public FetchAllUserProfilesResponse fetchAllUserProfiles (FetchAllUserProfilesParams fetchAllUserProfilesParams )
286
+ throws AlgoliaRuntimeException {
287
+ return this .fetchAllUserProfiles (fetchAllUserProfilesParams , null );
288
+ }
289
+
290
+ /**
291
+ * (asynchronously) Get all users with predictions in the provided application.
292
+ *
293
+ * @param fetchAllUserProfilesParams (required)
294
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
295
+ * the transporter requestOptions.
296
+ * @return CompletableFuture<FetchAllUserProfilesResponse> The awaitable future
297
+ * @throws AlgoliaRuntimeException If it fails to process the API call
298
+ */
299
+ public CompletableFuture <FetchAllUserProfilesResponse > fetchAllUserProfilesAsync (
300
+ FetchAllUserProfilesParams fetchAllUserProfilesParams ,
301
+ RequestOptions requestOptions
302
+ ) throws AlgoliaRuntimeException {
303
+ if (fetchAllUserProfilesParams == null ) {
304
+ throw new AlgoliaRuntimeException ("Parameter `fetchAllUserProfilesParams` is required when calling" + " `fetchAllUserProfiles`." );
305
+ }
306
+
307
+ Object bodyObj = fetchAllUserProfilesParams ;
308
+
309
+ // create path and map variables
310
+ String requestPath = "/1/users" ;
311
+
312
+ Map <String , Object > queryParameters = new HashMap <String , Object >();
313
+ Map <String , String > headers = new HashMap <String , String >();
314
+
315
+ Call call = this .buildCall (requestPath , "POST" , queryParameters , bodyObj , headers , requestOptions , false );
316
+ return this .executeAsync (call , new TypeReference <FetchAllUserProfilesResponse >() {});
317
+ }
318
+
319
+ /**
320
+ * (asynchronously) Get all users with predictions in the provided application.
321
+ *
322
+ * @param fetchAllUserProfilesParams (required)
323
+ * @return CompletableFuture<FetchAllUserProfilesResponse> The awaitable future
324
+ * @throws AlgoliaRuntimeException If it fails to process the API call
325
+ */
326
+ public CompletableFuture <FetchAllUserProfilesResponse > fetchAllUserProfilesAsync (FetchAllUserProfilesParams fetchAllUserProfilesParams )
327
+ throws AlgoliaRuntimeException {
328
+ return this .fetchAllUserProfilesAsync (fetchAllUserProfilesParams , null );
329
+ }
330
+
192
331
/**
193
332
* Get predictions, properties (raw, computed or custom) and segments (computed or custom) for a
194
333
* user profile.
@@ -198,11 +337,10 @@ public CompletableFuture<Object> delAsync(String path) throws AlgoliaRuntimeExce
198
337
* @param params (required)
199
338
* @param requestOptions The requestOptions to send along with the query, they will be merged with
200
339
* the transporter requestOptions.
201
- * @return FetchUserProfileResponse
340
+ * @return UserProfile
202
341
* @throws AlgoliaRuntimeException If it fails to process the API call
203
342
*/
204
- public FetchUserProfileResponse fetchUserProfile (String userID , Params params , RequestOptions requestOptions )
205
- throws AlgoliaRuntimeException {
343
+ public UserProfile fetchUserProfile (String userID , Params params , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
206
344
return LaunderThrowable .await (fetchUserProfileAsync (userID , params , requestOptions ));
207
345
}
208
346
@@ -213,10 +351,10 @@ public FetchUserProfileResponse fetchUserProfile(String userID, Params params, R
213
351
* @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users
214
352
* (visitors). (required)
215
353
* @param params (required)
216
- * @return FetchUserProfileResponse
354
+ * @return UserProfile
217
355
* @throws AlgoliaRuntimeException If it fails to process the API call
218
356
*/
219
- public FetchUserProfileResponse fetchUserProfile (String userID , Params params ) throws AlgoliaRuntimeException {
357
+ public UserProfile fetchUserProfile (String userID , Params params ) throws AlgoliaRuntimeException {
220
358
return this .fetchUserProfile (userID , params , null );
221
359
}
222
360
@@ -229,10 +367,10 @@ public FetchUserProfileResponse fetchUserProfile(String userID, Params params) t
229
367
* @param params (required)
230
368
* @param requestOptions The requestOptions to send along with the query, they will be merged with
231
369
* the transporter requestOptions.
232
- * @return CompletableFuture<FetchUserProfileResponse > The awaitable future
370
+ * @return CompletableFuture<UserProfile > The awaitable future
233
371
* @throws AlgoliaRuntimeException If it fails to process the API call
234
372
*/
235
- public CompletableFuture <FetchUserProfileResponse > fetchUserProfileAsync (String userID , Params params , RequestOptions requestOptions )
373
+ public CompletableFuture <UserProfile > fetchUserProfileAsync (String userID , Params params , RequestOptions requestOptions )
236
374
throws AlgoliaRuntimeException {
237
375
if (userID == null ) {
238
376
throw new AlgoliaRuntimeException ("Parameter `userID` is required when calling `fetchUserProfile`." );
@@ -251,7 +389,7 @@ public CompletableFuture<FetchUserProfileResponse> fetchUserProfileAsync(String
251
389
Map <String , String > headers = new HashMap <String , String >();
252
390
253
391
Call call = this .buildCall (requestPath , "POST" , queryParameters , bodyObj , headers , requestOptions , false );
254
- return this .executeAsync (call , new TypeReference <FetchUserProfileResponse >() {});
392
+ return this .executeAsync (call , new TypeReference <UserProfile >() {});
255
393
}
256
394
257
395
/**
@@ -261,10 +399,10 @@ public CompletableFuture<FetchUserProfileResponse> fetchUserProfileAsync(String
261
399
* @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users
262
400
* (visitors). (required)
263
401
* @param params (required)
264
- * @return CompletableFuture<FetchUserProfileResponse > The awaitable future
402
+ * @return CompletableFuture<UserProfile > The awaitable future
265
403
* @throws AlgoliaRuntimeException If it fails to process the API call
266
404
*/
267
- public CompletableFuture <FetchUserProfileResponse > fetchUserProfileAsync (String userID , Params params ) throws AlgoliaRuntimeException {
405
+ public CompletableFuture <UserProfile > fetchUserProfileAsync (String userID , Params params ) throws AlgoliaRuntimeException {
268
406
return this .fetchUserProfileAsync (userID , params , null );
269
407
}
270
408
0 commit comments