@@ -51,7 +51,7 @@ public void rawRequest_listStores() throws Exception {
5151
5252 // Use ApiExecutor to list stores (equivalent to GET /stores)
5353 ApiExecutorRequestBuilder request =
54- ApiExecutorRequestBuilder .builder (" GET" , "/stores" ).build ();
54+ ApiExecutorRequestBuilder .builder (HttpMethod . GET , "/stores" ).build ();
5555
5656 ApiResponse <ListStoresResponse > response =
5757 fga .apiExecutor ().send (request , ListStoresResponse .class ).get ();
@@ -84,7 +84,7 @@ public void rawRequest_createStore_typedResponse() throws Exception {
8484 requestBody .put ("name" , storeName );
8585
8686 // Use ApiExecutor to create store (equivalent to POST /stores)
87- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (" POST" , "/stores" )
87+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (HttpMethod . POST , "/stores" )
8888 .body (requestBody )
8989 .build ();
9090
@@ -115,7 +115,7 @@ public void rawRequest_createStore_rawJsonResponse() throws Exception {
115115 requestBody .put ("name" , storeName );
116116
117117 // Use ApiExecutor to create store and get raw JSON response
118- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (" POST" , "/stores" )
118+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (HttpMethod . POST , "/stores" )
119119 .body (requestBody )
120120 .build ();
121121
@@ -147,7 +147,7 @@ public void rawRequest_getStore_withPathParams() throws Exception {
147147 String storeId = createStoreUsingRawRequest (storeName );
148148
149149 // Use ApiExecutor to get store details (equivalent to GET /stores/{store_id})
150- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (" GET" , "/stores/{store_id}" )
150+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (HttpMethod . GET , "/stores/{store_id}" )
151151 .pathParam ("store_id" , storeId )
152152 .build ();
153153
@@ -176,8 +176,8 @@ public void rawRequest_automaticStoreIdReplacement() throws Exception {
176176 fga .setStoreId (storeId );
177177
178178 // Use ApiExecutor WITHOUT providing store_id path param - it should be auto-replaced
179- ApiExecutorRequestBuilder request =
180- ApiExecutorRequestBuilder . builder ( "GET" , "/stores/{store_id}" ) .build ();
179+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder . builder ( HttpMethod . GET , "/stores/{store_id}" )
180+ .build ();
181181
182182 ApiResponse <GetStoreResponse > response =
183183 fga .apiExecutor ().send (request , GetStoreResponse .class ).get ();
@@ -228,7 +228,7 @@ public void rawRequest_writeAuthorizationModel() throws Exception {
228228
229229 // Use ApiExecutor to write authorization model
230230 ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (
231- " POST" , "/stores/{store_id}/authorization-models" )
231+ HttpMethod . POST , "/stores/{store_id}/authorization-models" )
232232 .body (requestBody )
233233 .build ();
234234
@@ -261,7 +261,7 @@ public void rawRequest_readAuthorizationModels_withQueryParams() throws Exceptio
261261
262262 // Use ApiExecutor to read authorization models with query parameters
263263 ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (
264- " GET" , "/stores/{store_id}/authorization-models" )
264+ HttpMethod . GET , "/stores/{store_id}/authorization-models" )
265265 .queryParam ("page_size" , "10" )
266266 .queryParam ("continuation_token" , "" )
267267 .build ();
@@ -308,7 +308,8 @@ public void rawRequest_check() throws Exception {
308308 tupleKey .put ("object" , "document:budget" );
309309 checkBody .put ("tuple_key" , tupleKey );
310310
311- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder ("POST" , "/stores/{store_id}/check" )
311+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (
312+ HttpMethod .POST , "/stores/{store_id}/check" )
312313 .body (checkBody )
313314 .build ();
314315
@@ -331,7 +332,7 @@ public void rawRequest_withCustomHeaders() throws Exception {
331332 requestBody .put ("name" , storeName );
332333
333334 // Use ApiExecutor with custom headers
334- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (" POST" , "/stores" )
335+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (HttpMethod . POST , "/stores" )
335336 .body (requestBody )
336337 .header ("X-Custom-Header" , "custom-value" )
337338 .header ("X-Request-ID" , "test-123" )
@@ -353,7 +354,7 @@ public void rawRequest_withCustomHeaders() throws Exception {
353354 @ Test
354355 public void rawRequest_errorHandling_notFound () throws Exception {
355356 // Try to get a non-existent store
356- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (" GET" , "/stores/{store_id}" )
357+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (HttpMethod . GET , "/stores/{store_id}" )
357358 .pathParam ("store_id" , "non-existent-store-id" )
358359 .build ();
359360
@@ -383,7 +384,7 @@ public void rawRequest_listStores_withPagination() throws Exception {
383384 }
384385
385386 // Use ApiExecutor to list stores with pagination
386- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (" GET" , "/stores" )
387+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (HttpMethod . GET , "/stores" )
387388 .queryParam ("page_size" , "2" )
388389 .build ();
389390
@@ -409,7 +410,7 @@ private String createStoreUsingRawRequest(String storeName) throws Exception {
409410 Map <String , Object > requestBody = new HashMap <>();
410411 requestBody .put ("name" , storeName );
411412
412- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (" POST" , "/stores" )
413+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (HttpMethod . POST , "/stores" )
413414 .body (requestBody )
414415 .build ();
415416
@@ -445,7 +446,7 @@ private String writeSimpleAuthorizationModel(String storeId) throws Exception {
445446 requestBody .put ("type_definitions" , typeDefinitions );
446447
447448 ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (
448- " POST" , "/stores/{store_id}/authorization-models" )
449+ HttpMethod . POST , "/stores/{store_id}/authorization-models" )
449450 .pathParam ("store_id" , storeId )
450451 .body (requestBody )
451452 .build ();
@@ -467,7 +468,8 @@ private void writeTupleUsingRawRequest(String storeId, String user, String relat
467468 Map <String , Object > requestBody = new HashMap <>();
468469 requestBody .put ("writes" , Map .of ("tuple_keys" , List .of (tupleKey )));
469470
470- ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder ("POST" , "/stores/{store_id}/write" )
471+ ApiExecutorRequestBuilder request = ApiExecutorRequestBuilder .builder (
472+ HttpMethod .POST , "/stores/{store_id}/write" )
471473 .pathParam ("store_id" , storeId )
472474 .body (requestBody )
473475 .build ();
0 commit comments