@@ -82,7 +82,7 @@ public CompletableFuture<ClientListStoresResponse> listStores(ClientListStoresOp
8282 configuration .assertValid ();
8383 var overrides = new ConfigurationOverride ().addHeaders (options );
8484 return call (() -> api .listStores (
85- options .getPageSize (), options .getContinuationToken (), options .getName (), overrides ))
85+ options .getPageSize (), options .getContinuationToken (), options .getName (), overrides ))
8686 .thenApply (ClientListStoresResponse ::new );
8787 }
8888
@@ -299,12 +299,12 @@ public CompletableFuture<ClientReadChangesResponse> readChanges(
299299 var options = readChangesOptions != null ? readChangesOptions : new ClientReadChangesOptions ();
300300 var overrides = new ConfigurationOverride ().addHeaders (options );
301301 return call (() -> api .readChanges (
302- storeId ,
303- request .getType (),
304- options .getPageSize (),
305- options .getContinuationToken (),
306- request .getStartTime (),
307- overrides ))
302+ storeId ,
303+ request .getType (),
304+ options .getPageSize (),
305+ options .getContinuationToken (),
306+ request .getStartTime (),
307+ overrides ))
308308 .thenApply (ClientReadChangesResponse ::new );
309309 }
310310
@@ -495,19 +495,19 @@ private CompletableFuture<ClientWriteResponse> writeTransactions(
495495 // For transaction-based writes, all tuples are successful if the call succeeds
496496 List <ClientWriteSingleResponse > writeResponses = writeTuples != null
497497 ? writeTuples .stream ()
498- .map (tuple -> new ClientWriteSingleResponse (tuple .asTupleKey (), ClientWriteStatus .SUCCESS ))
499- .collect (Collectors .toList ())
498+ .map (tuple -> new ClientWriteSingleResponse (tuple .asTupleKey (), ClientWriteStatus .SUCCESS ))
499+ .collect (Collectors .toList ())
500500 : new ArrayList <>();
501501
502502 List <ClientWriteSingleResponse > deleteResponses = deleteTuples != null
503503 ? deleteTuples .stream ()
504- .map (tuple -> new ClientWriteSingleResponse (
505- new TupleKey ()
506- .user (tuple .getUser ())
507- .relation (tuple .getRelation ())
508- ._object (tuple .getObject ()),
509- ClientWriteStatus .SUCCESS ))
510- .collect (Collectors .toList ())
504+ .map (tuple -> new ClientWriteSingleResponse (
505+ new TupleKey ()
506+ .user (tuple .getUser ())
507+ .relation (tuple .getRelation ())
508+ ._object (tuple .getObject ()),
509+ ClientWriteStatus .SUCCESS ))
510+ .collect (Collectors .toList ())
511511 : new ArrayList <>();
512512
513513 return new ClientWriteResponse (writeResponses , deleteResponses );
@@ -642,18 +642,18 @@ private CompletableFuture<ClientWriteResponse> writeNonTransaction(
642642 CompletableFuture <List <ClientWriteSingleResponse >> allWritesFuture = writeFutures .isEmpty ()
643643 ? CompletableFuture .completedFuture (new ArrayList <>())
644644 : CompletableFuture .allOf (writeFutures .toArray (new CompletableFuture [0 ]))
645- .thenApply (v -> writeFutures .stream ()
646- .map (CompletableFuture ::join )
647- .flatMap (List ::stream )
648- .collect (Collectors .toList ()));
645+ .thenApply (v -> writeFutures .stream ()
646+ .map (CompletableFuture ::join )
647+ .flatMap (List ::stream )
648+ .collect (Collectors .toList ()));
649649
650650 CompletableFuture <List <ClientWriteSingleResponse >> allDeletesFuture = deleteFutures .isEmpty ()
651651 ? CompletableFuture .completedFuture (new ArrayList <>())
652652 : CompletableFuture .allOf (deleteFutures .toArray (new CompletableFuture [0 ]))
653- .thenApply (v -> deleteFutures .stream ()
654- .map (CompletableFuture ::join )
655- .flatMap (List ::stream )
656- .collect (Collectors .toList ()));
653+ .thenApply (v -> deleteFutures .stream ()
654+ .map (CompletableFuture ::join )
655+ .flatMap (List ::stream )
656+ .collect (Collectors .toList ()));
657657
658658 return CompletableFuture .allOf (allWritesFuture , allDeletesFuture )
659659 .thenApply (v -> new ClientWriteResponse (allWritesFuture .join (), allDeletesFuture .join ()));
@@ -831,7 +831,7 @@ public CompletableFuture<List<ClientBatchCheckClientResponse>> clientBatchCheck(
831831 var options = batchCheckOptions != null
832832 ? batchCheckOptions
833833 : new ClientBatchCheckClientOptions ()
834- .maxParallelRequests (FgaConstants .CLIENT_MAX_METHOD_PARALLEL_REQUESTS );
834+ .maxParallelRequests (FgaConstants .CLIENT_MAX_METHOD_PARALLEL_REQUESTS );
835835
836836 HashMap <String , String > headers = options .getAdditionalHeaders () != null
837837 ? new HashMap <>(options .getAdditionalHeaders ())
@@ -892,8 +892,8 @@ public CompletableFuture<ClientBatchCheckResponse> batchCheck(
892892 var options = batchCheckOptions != null
893893 ? batchCheckOptions
894894 : new ClientBatchCheckOptions ()
895- .maxParallelRequests (FgaConstants .CLIENT_MAX_METHOD_PARALLEL_REQUESTS )
896- .maxBatchSize (FgaConstants .CLIENT_MAX_BATCH_SIZE );
895+ .maxParallelRequests (FgaConstants .CLIENT_MAX_METHOD_PARALLEL_REQUESTS )
896+ .maxBatchSize (FgaConstants .CLIENT_MAX_BATCH_SIZE );
897897
898898 HashMap <String , String > headers = options .getAdditionalHeaders () != null
899899 ? new HashMap <>(options .getAdditionalHeaders ())
@@ -954,22 +954,22 @@ public CompletableFuture<ClientBatchCheckResponse> batchCheck(
954954 var override = new ConfigurationOverride ().addHeaders (options );
955955
956956 Consumer <List <BatchCheckItem >> singleBatchCheckRequest = request -> call (() -> {
957- BatchCheckRequest body = new BatchCheckRequest ().checks (request );
958- if (options .getConsistency () != null ) {
959- body .consistency (options .getConsistency ());
960- }
957+ BatchCheckRequest body = new BatchCheckRequest ().checks (request );
958+ if (options .getConsistency () != null ) {
959+ body .consistency (options .getConsistency ());
960+ }
961961
962- // Set authorizationModelId from options if available; otherwise, use the default from configuration
963- String authorizationModelId = !isNullOrWhitespace (options .getAuthorizationModelId ())
964- ? options .getAuthorizationModelId ()
965- : configuration .getAuthorizationModelId ();
962+ // Set authorizationModelId from options if available; otherwise, use the default from configuration
963+ String authorizationModelId = !isNullOrWhitespace (options .getAuthorizationModelId ())
964+ ? options .getAuthorizationModelId ()
965+ : configuration .getAuthorizationModelId ();
966966
967- if (!isNullOrWhitespace (authorizationModelId )) {
968- body .authorizationModelId (authorizationModelId );
969- }
967+ if (!isNullOrWhitespace (authorizationModelId )) {
968+ body .authorizationModelId (authorizationModelId );
969+ }
970970
971- return api .batchCheck (configuration .getStoreId (), body , override );
972- })
971+ return api .batchCheck (configuration .getStoreId (), body , override );
972+ })
973973 .whenComplete ((batchCheckResponseApiResponse , throwable ) -> {
974974 try {
975975 if (throwable != null ) {
@@ -1205,7 +1205,7 @@ public CompletableFuture<ClientListRelationsResponse> listRelations(
12051205 var options = listRelationsOptions != null
12061206 ? listRelationsOptions
12071207 : new ClientListRelationsOptions ()
1208- .maxParallelRequests (FgaConstants .CLIENT_MAX_METHOD_PARALLEL_REQUESTS );
1208+ .maxParallelRequests (FgaConstants .CLIENT_MAX_METHOD_PARALLEL_REQUESTS );
12091209
12101210 HashMap <String , String > headers = options .getAdditionalHeaders () != null
12111211 ? new HashMap <>(options .getAdditionalHeaders ())
@@ -1390,4 +1390,4 @@ private <T> CompletableFuture<T> call(CheckedInvocation<T> action) {
13901390 return CompletableFuture .failedFuture (throwable );
13911391 }
13921392 }
1393- }
1393+ }
0 commit comments