diff --git a/config/clients/java/template/OpenFgaApiTest.java.mustache b/config/clients/java/template/OpenFgaApiTest.java.mustache index 55c31a47..d0ad5f9f 100644 --- a/config/clients/java/template/OpenFgaApiTest.java.mustache +++ b/config/clients/java/template/OpenFgaApiTest.java.mustache @@ -18,6 +18,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; +import java.time.OffsetDateTime; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -794,9 +795,10 @@ public class OpenFgaApiTest { String type = null; // Input is optional Integer pageSize = null; // Input is optional String continuationToken = null; // Input is optional + OffsetDateTime startTime = null; //Input is optional // When - var response = fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken) + var response = fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken, startTime) .get(); // Then @@ -814,7 +816,7 @@ public class OpenFgaApiTest { @Test public void readChanges_storeIdRequired() throws Exception { // When - var exception = assertThrows(FgaInvalidParameterException.class, () -> fga.readChanges(null, null, null, null) + var exception = assertThrows(FgaInvalidParameterException.class, () -> fga.readChanges(null, null, null, null, null) .get()); // Then @@ -831,10 +833,11 @@ public class OpenFgaApiTest { String type = null; // Input is optional Integer pageSize = null; // Input is optional String continuationToken = null; // Input is optional + OffsetDateTime startTime = null; // Input is optional // When ExecutionException execException = assertThrows( - ExecutionException.class, () -> fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken) + ExecutionException.class, () -> fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken, startTime) .get()); // Then @@ -856,10 +859,11 @@ public class OpenFgaApiTest { String type = null; // Input is optional Integer pageSize = null; // Input is optional String continuationToken = null; // Input is optional + OffsetDateTime startTime = null; // Input is optional // When ExecutionException execException = assertThrows( - ExecutionException.class, () -> fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken) + ExecutionException.class, () -> fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken, startTime) .get()); // Then @@ -880,10 +884,11 @@ public class OpenFgaApiTest { String type = null; // Input is optional Integer pageSize = null; // Input is optional String continuationToken = null; // Input is optional + OffsetDateTime startTime = null; // Input is optional // When ExecutionException execException = assertThrows( - ExecutionException.class, () -> fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken) + ExecutionException.class, () -> fga.readChanges(DEFAULT_STORE_ID, type, pageSize, continuationToken, startTime) .get()); // Then diff --git a/config/clients/java/template/client-ClientReadChangesRequest.java.mustache b/config/clients/java/template/client-ClientReadChangesRequest.java.mustache index 030a07c4..be00cedb 100644 --- a/config/clients/java/template/client-ClientReadChangesRequest.java.mustache +++ b/config/clients/java/template/client-ClientReadChangesRequest.java.mustache @@ -1,12 +1,18 @@ {{>licenseInfo}} package {{clientPackage}}.model; +import java.time.OffsetDateTime; + public class ClientReadChangesRequest { private String type; - private String startTime; + private OffsetDateTime startTime; public ClientReadChangesRequest type(String type) { this.type = type; + return this; + } + + public ClientReadChangesRequest startTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -15,7 +21,7 @@ public class ClientReadChangesRequest { return type; } - public String getStartTime(){ + public OffsetDateTime getStartTime(){ return startTime; } } diff --git a/config/clients/java/template/client-OpenFgaClient.java.mustache b/config/clients/java/template/client-OpenFgaClient.java.mustache index 164b9e53..c4001c95 100644 --- a/config/clients/java/template/client-OpenFgaClient.java.mustache +++ b/config/clients/java/template/client-OpenFgaClient.java.mustache @@ -283,7 +283,7 @@ public class OpenFgaClient { var options = readChangesOptions != null ? readChangesOptions : new ClientReadChangesOptions(); var overrides = new ConfigurationOverride().addHeaders(options); return call(() -> api.readChanges( - storeId, request.getType(), options.getPageSize(), options.getContinuationToken(), overrides)) + storeId, request.getType(), options.getPageSize(), options.getContinuationToken(), request.getStartTime(), overrides)) .thenApply(ClientReadChangesResponse::new); }