```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; import io.appwrite.Role; import io.appwrite.services.Presences; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key Presences presences = new Presences(client); presences.update( "", // presenceId "", // userId "", // status (optional) "2020-10-15T06:38:00.000+00:00", // expiresAt (optional) Map.of("a", "b"), // metadata (optional) List.of(Permission.read(Role.any())), // permissions (optional) false, // purge (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; } System.out.println(result); }) ); ```