17
17
import java .util .Map ;
18
18
import java .util .concurrent .CompletableFuture ;
19
19
import javax .annotation .Nonnull ;
20
+ import javax .annotation .Nullable ;
20
21
21
22
public class InsightsClient extends ApiClient {
22
23
@@ -79,7 +80,7 @@ private static List<Host> getDefaultHosts(String region) throws AlgoliaRuntimeEx
79
80
* the transporter requestOptions.
80
81
* @throws AlgoliaRuntimeException If it fails to process the API call
81
82
*/
82
- public Object customDelete (@ Nonnull String path , Map <String , Object > parameters , RequestOptions requestOptions )
83
+ public Object customDelete (@ Nonnull String path , Map <String , Object > parameters , @ Nullable RequestOptions requestOptions )
83
84
throws AlgoliaRuntimeException {
84
85
return LaunderThrowable .await (customDeleteAsync (path , parameters , requestOptions ));
85
86
}
@@ -103,7 +104,7 @@ public Object customDelete(@Nonnull String path, Map<String, Object> parameters)
103
104
* the transporter requestOptions.
104
105
* @throws AlgoliaRuntimeException If it fails to process the API call
105
106
*/
106
- public Object customDelete (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
107
+ public Object customDelete (@ Nonnull String path , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
107
108
return this .customDelete (path , null , requestOptions );
108
109
}
109
110
@@ -126,8 +127,11 @@ public Object customDelete(@Nonnull String path) throws AlgoliaRuntimeException
126
127
* the transporter requestOptions.
127
128
* @throws AlgoliaRuntimeException If it fails to process the API call
128
129
*/
129
- public CompletableFuture <Object > customDeleteAsync (@ Nonnull String path , Map <String , Object > parameters , RequestOptions requestOptions )
130
- throws AlgoliaRuntimeException {
130
+ public CompletableFuture <Object > customDeleteAsync (
131
+ @ Nonnull String path ,
132
+ Map <String , Object > parameters ,
133
+ @ Nullable RequestOptions requestOptions
134
+ ) throws AlgoliaRuntimeException {
131
135
Parameters .requireNonNull (path , "Parameter `path` is required when calling `customDelete`." );
132
136
133
137
HttpRequest request = HttpRequest .builder ().setPathEncoded ("/{path}" , path ).setMethod ("DELETE" ).addQueryParameters (parameters ).build ();
@@ -153,7 +157,8 @@ public CompletableFuture<Object> customDeleteAsync(@Nonnull String path, Map<Str
153
157
* the transporter requestOptions.
154
158
* @throws AlgoliaRuntimeException If it fails to process the API call
155
159
*/
156
- public CompletableFuture <Object > customDeleteAsync (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
160
+ public CompletableFuture <Object > customDeleteAsync (@ Nonnull String path , @ Nullable RequestOptions requestOptions )
161
+ throws AlgoliaRuntimeException {
157
162
return this .customDeleteAsync (path , null , requestOptions );
158
163
}
159
164
@@ -176,7 +181,7 @@ public CompletableFuture<Object> customDeleteAsync(@Nonnull String path) throws
176
181
* the transporter requestOptions.
177
182
* @throws AlgoliaRuntimeException If it fails to process the API call
178
183
*/
179
- public Object customGet (@ Nonnull String path , Map <String , Object > parameters , RequestOptions requestOptions )
184
+ public Object customGet (@ Nonnull String path , Map <String , Object > parameters , @ Nullable RequestOptions requestOptions )
180
185
throws AlgoliaRuntimeException {
181
186
return LaunderThrowable .await (customGetAsync (path , parameters , requestOptions ));
182
187
}
@@ -200,7 +205,7 @@ public Object customGet(@Nonnull String path, Map<String, Object> parameters) th
200
205
* the transporter requestOptions.
201
206
* @throws AlgoliaRuntimeException If it fails to process the API call
202
207
*/
203
- public Object customGet (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
208
+ public Object customGet (@ Nonnull String path , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
204
209
return this .customGet (path , null , requestOptions );
205
210
}
206
211
@@ -223,8 +228,11 @@ public Object customGet(@Nonnull String path) throws AlgoliaRuntimeException {
223
228
* the transporter requestOptions.
224
229
* @throws AlgoliaRuntimeException If it fails to process the API call
225
230
*/
226
- public CompletableFuture <Object > customGetAsync (@ Nonnull String path , Map <String , Object > parameters , RequestOptions requestOptions )
227
- throws AlgoliaRuntimeException {
231
+ public CompletableFuture <Object > customGetAsync (
232
+ @ Nonnull String path ,
233
+ Map <String , Object > parameters ,
234
+ @ Nullable RequestOptions requestOptions
235
+ ) throws AlgoliaRuntimeException {
228
236
Parameters .requireNonNull (path , "Parameter `path` is required when calling `customGet`." );
229
237
230
238
HttpRequest request = HttpRequest .builder ().setPathEncoded ("/{path}" , path ).setMethod ("GET" ).addQueryParameters (parameters ).build ();
@@ -250,7 +258,8 @@ public CompletableFuture<Object> customGetAsync(@Nonnull String path, Map<String
250
258
* the transporter requestOptions.
251
259
* @throws AlgoliaRuntimeException If it fails to process the API call
252
260
*/
253
- public CompletableFuture <Object > customGetAsync (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
261
+ public CompletableFuture <Object > customGetAsync (@ Nonnull String path , @ Nullable RequestOptions requestOptions )
262
+ throws AlgoliaRuntimeException {
254
263
return this .customGetAsync (path , null , requestOptions );
255
264
}
256
265
@@ -274,7 +283,7 @@ public CompletableFuture<Object> customGetAsync(@Nonnull String path) throws Alg
274
283
* the transporter requestOptions.
275
284
* @throws AlgoliaRuntimeException If it fails to process the API call
276
285
*/
277
- public Object customPost (@ Nonnull String path , Map <String , Object > parameters , Object body , RequestOptions requestOptions )
286
+ public Object customPost (@ Nonnull String path , Map <String , Object > parameters , Object body , @ Nullable RequestOptions requestOptions )
278
287
throws AlgoliaRuntimeException {
279
288
return LaunderThrowable .await (customPostAsync (path , parameters , body , requestOptions ));
280
289
}
@@ -299,7 +308,7 @@ public Object customPost(@Nonnull String path, Map<String, Object> parameters, O
299
308
* the transporter requestOptions.
300
309
* @throws AlgoliaRuntimeException If it fails to process the API call
301
310
*/
302
- public Object customPost (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
311
+ public Object customPost (@ Nonnull String path , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
303
312
return this .customPost (path , null , null , requestOptions );
304
313
}
305
314
@@ -327,7 +336,7 @@ public CompletableFuture<Object> customPostAsync(
327
336
@ Nonnull String path ,
328
337
Map <String , Object > parameters ,
329
338
Object body ,
330
- RequestOptions requestOptions
339
+ @ Nullable RequestOptions requestOptions
331
340
) throws AlgoliaRuntimeException {
332
341
Parameters .requireNonNull (path , "Parameter `path` is required when calling `customPost`." );
333
342
@@ -361,7 +370,8 @@ public CompletableFuture<Object> customPostAsync(@Nonnull String path, Map<Strin
361
370
* the transporter requestOptions.
362
371
* @throws AlgoliaRuntimeException If it fails to process the API call
363
372
*/
364
- public CompletableFuture <Object > customPostAsync (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
373
+ public CompletableFuture <Object > customPostAsync (@ Nonnull String path , @ Nullable RequestOptions requestOptions )
374
+ throws AlgoliaRuntimeException {
365
375
return this .customPostAsync (path , null , null , requestOptions );
366
376
}
367
377
@@ -385,7 +395,7 @@ public CompletableFuture<Object> customPostAsync(@Nonnull String path) throws Al
385
395
* the transporter requestOptions.
386
396
* @throws AlgoliaRuntimeException If it fails to process the API call
387
397
*/
388
- public Object customPut (@ Nonnull String path , Map <String , Object > parameters , Object body , RequestOptions requestOptions )
398
+ public Object customPut (@ Nonnull String path , Map <String , Object > parameters , Object body , @ Nullable RequestOptions requestOptions )
389
399
throws AlgoliaRuntimeException {
390
400
return LaunderThrowable .await (customPutAsync (path , parameters , body , requestOptions ));
391
401
}
@@ -410,7 +420,7 @@ public Object customPut(@Nonnull String path, Map<String, Object> parameters, Ob
410
420
* the transporter requestOptions.
411
421
* @throws AlgoliaRuntimeException If it fails to process the API call
412
422
*/
413
- public Object customPut (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
423
+ public Object customPut (@ Nonnull String path , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
414
424
return this .customPut (path , null , null , requestOptions );
415
425
}
416
426
@@ -438,7 +448,7 @@ public CompletableFuture<Object> customPutAsync(
438
448
@ Nonnull String path ,
439
449
Map <String , Object > parameters ,
440
450
Object body ,
441
- RequestOptions requestOptions
451
+ @ Nullable RequestOptions requestOptions
442
452
) throws AlgoliaRuntimeException {
443
453
Parameters .requireNonNull (path , "Parameter `path` is required when calling `customPut`." );
444
454
@@ -472,7 +482,8 @@ public CompletableFuture<Object> customPutAsync(@Nonnull String path, Map<String
472
482
* the transporter requestOptions.
473
483
* @throws AlgoliaRuntimeException If it fails to process the API call
474
484
*/
475
- public CompletableFuture <Object > customPutAsync (@ Nonnull String path , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
485
+ public CompletableFuture <Object > customPutAsync (@ Nonnull String path , @ Nullable RequestOptions requestOptions )
486
+ throws AlgoliaRuntimeException {
476
487
return this .customPutAsync (path , null , null , requestOptions );
477
488
}
478
489
@@ -496,7 +507,7 @@ public CompletableFuture<Object> customPutAsync(@Nonnull String path) throws Alg
496
507
* the transporter requestOptions.
497
508
* @throws AlgoliaRuntimeException If it fails to process the API call
498
509
*/
499
- public void deleteUserToken (@ Nonnull String userToken , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
510
+ public void deleteUserToken (@ Nonnull String userToken , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
500
511
LaunderThrowable .await (deleteUserTokenAsync (userToken , requestOptions ));
501
512
return ;
502
513
}
@@ -523,7 +534,7 @@ public void deleteUserToken(@Nonnull String userToken) throws AlgoliaRuntimeExce
523
534
* the transporter requestOptions.
524
535
* @throws AlgoliaRuntimeException If it fails to process the API call
525
536
*/
526
- public CompletableFuture <Void > deleteUserTokenAsync (@ Nonnull String userToken , RequestOptions requestOptions )
537
+ public CompletableFuture <Void > deleteUserTokenAsync (@ Nonnull String userToken , @ Nullable RequestOptions requestOptions )
527
538
throws AlgoliaRuntimeException {
528
539
Parameters .requireNonNull (userToken , "Parameter `userToken` is required when calling `deleteUserToken`." );
529
540
@@ -552,7 +563,8 @@ public CompletableFuture<Void> deleteUserTokenAsync(@Nonnull String userToken) t
552
563
* the transporter requestOptions.
553
564
* @throws AlgoliaRuntimeException If it fails to process the API call
554
565
*/
555
- public EventsResponse pushEvents (@ Nonnull InsightsEvents insightsEvents , RequestOptions requestOptions ) throws AlgoliaRuntimeException {
566
+ public EventsResponse pushEvents (@ Nonnull InsightsEvents insightsEvents , @ Nullable RequestOptions requestOptions )
567
+ throws AlgoliaRuntimeException {
556
568
return LaunderThrowable .await (pushEventsAsync (insightsEvents , requestOptions ));
557
569
}
558
570
@@ -576,7 +588,7 @@ public EventsResponse pushEvents(@Nonnull InsightsEvents insightsEvents) throws
576
588
* the transporter requestOptions.
577
589
* @throws AlgoliaRuntimeException If it fails to process the API call
578
590
*/
579
- public CompletableFuture <EventsResponse > pushEventsAsync (@ Nonnull InsightsEvents insightsEvents , RequestOptions requestOptions )
591
+ public CompletableFuture <EventsResponse > pushEventsAsync (@ Nonnull InsightsEvents insightsEvents , @ Nullable RequestOptions requestOptions )
580
592
throws AlgoliaRuntimeException {
581
593
Parameters .requireNonNull (insightsEvents , "Parameter `insightsEvents` is required when calling `pushEvents`." );
582
594
0 commit comments