{"id":28403855,"url":"https://github.com/openfga/java-sdk","last_synced_at":"2026-02-18T16:03:51.317Z","repository":{"id":193544731,"uuid":"670224534","full_name":"openfga/java-sdk","owner":"openfga","description":"OpenFGA SDK for Java - https://central.sonatype.com/artifact/dev.openfga/openfga-sdk","archived":false,"fork":false,"pushed_at":"2026-02-15T21:27:29.000Z","size":1581,"stargazers_count":49,"open_issues_count":19,"forks_count":23,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-02-16T02:58:15.397Z","etag":null,"topics":["access-control","authorization","fga","fine-grained-authorization","hacktoberfest","java","openfga","openfga-client","security","zanzibar"],"latest_commit_sha":null,"homepage":"https://openfga.dev","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfga.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY-INSIGHTS.yml","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-24T15:05:21.000Z","updated_at":"2026-02-13T02:53:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4c6705a-c4f8-4469-b663-5151005aabc7","html_url":"https://github.com/openfga/java-sdk","commit_stats":null,"previous_names":["openfga/java-sdk"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/openfga/java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fjava-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fjava-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fjava-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fjava-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfga","download_url":"https://codeload.github.com/openfga/java-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fjava-sdk/sbom","scorecard":{"id":113905,"data":{"date":"2025-08-15T19:54:01Z","repo":{"name":"github.com/openfga/java-sdk","commit":"ecef92e60274bb55021542d11f8f9d3fcffc574a"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":9,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yaml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/main.yaml:14","Info: jobLevel 'contents' permission set to 'read': .github/workflows/main.yaml:51","Info: jobLevel 'contents' permission set to 'read': .github/workflows/main.yaml:84","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/main.yaml:116","Info: topLevel 'contents' permission set to 'read': .github/workflows/fossa.yaml:3","Warn: no topLevel permission defined: .github/workflows/main.yaml:1","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  12 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:  10 out of  10 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/main.yaml:45"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/openfga/.github/SECURITY.md:1","Info: Found linked content: github.com/openfga/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/openfga/.github/SECURITY.md:1","Info: Found text in security policy: github.com/openfga/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"CI-Tests","score":10,"reason":"30 out of 30 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}},{"name":"Contributors","score":10,"reason":"project has 10 contributing companies or organizations","details":["Info: found contributions from: auth0, auth0 / @okta, auth0-samples, lambalabs, momentful, okta, openfga, psr-discovery, psr-mock, so-dang-cool"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}}]},"last_synced_at":"2025-08-15T21:41:22.974Z","repository_id":193544731,"created_at":"2025-08-15T21:41:22.975Z","updated_at":"2025-08-15T21:41:22.975Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29585442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-control","authorization","fga","fine-grained-authorization","hacktoberfest","java","openfga","openfga-client","security","zanzibar"],"created_at":"2025-06-01T19:11:03.380Z","updated_at":"2026-02-18T16:03:51.307Z","avatar_url":"https://github.com/openfga.png","language":"Java","readme":"# Java SDK for OpenFGA\n\n[![Maven Central](https://img.shields.io/maven-central/v/dev.openfga/openfga-sdk.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/dev.openfga/openfga-sdk)\n[![Javadoc](https://javadoc.io/badge2/dev.openfga/openfga-sdk/javadoc.svg)](https://javadoc.io/doc/dev.openfga/openfga-sdk)\n[![Socket Badge](https://badge.socket.dev/maven/package/dev.openfga:openfga-sdk)](https://socket.dev/maven/package/dev.openfga:openfga-sdk)\n[![DeepWiki](https://img.shields.io/badge/DeepWiki-openfga%2Fjava--sdk-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/openfga/java-sdk)\n[![Release](https://img.shields.io/github/v/release/openfga/java-sdk?sort=semver\u0026color=green)](https://github.com/openfga/java-sdk/releases)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fopenfga%2Fjava-sdk.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fopenfga%2Fjava-sdk?ref=badge_shield)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/openfga/java-sdk/badge)](https://securityscorecards.dev/viewer/?uri=github.com/openfga/java-sdk)\n[![Join our community](https://img.shields.io/badge/slack-cncf_%23openfga-40abb8.svg?logo=slack)](https://openfga.dev/community)\n[![X](https://img.shields.io/twitter/follow/openfga?color=%23179CF0\u0026logo=x\u0026style=flat-square \"@openfga on X\")](https://x.com/openfga)\n\nThis is an autogenerated Java SDK for OpenFGA. It provides a wrapper around the [OpenFGA API definition](https://openfga.dev/api).\n\n## Table of Contents\n\n- [About OpenFGA](#about)\n- [Resources](#resources)\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n  - [Initializing the API Client](#initializing-the-api-client)\n  - [Custom Headers](#custom-headers)\n  - [Get your Store ID](#get-your-store-id)\n  - [Calling the API](#calling-the-api)\n    - [Stores](#stores)\n      - [List All Stores](#list-stores)\n      - [Create a Store](#create-store)\n      - [Get a Store](#get-store)\n      - [Delete a Store](#delete-store)\n    - [Authorization Models](#authorization-models)\n      - [Read Authorization Models](#read-authorization-models)\n      - [Write Authorization Model](#write-authorization-model)\n      - [Read a Single Authorization Model](#read-a-single-authorization-model)\n      - [Read the Latest Authorization Model](#read-the-latest-authorization-model)\n    - [Relationship Tuples](#relationship-tuples)\n      - [Read Relationship Tuple Changes (Watch)](#read-relationship-tuple-changes-watch)\n      - [Read Relationship Tuples](#read-relationship-tuples)\n      - [Write (Create and Delete) Relationship Tuples](#write-create-and-delete-relationship-tuples)\n    - [Relationship Queries](#relationship-queries)\n      - [Check](#check)\n      - [Batch Check](#batch-check)\n      - [Expand](#expand)\n      - [List Objects](#list-objects)\n      - [List Relations](#list-relations)\n      - [List Users](#list-users)\n    - [Assertions](#assertions)\n      - [Read Assertions](#read-assertions)\n      - [Write Assertions](#write-assertions)\n  - [Calling Other Endpoints](#calling-other-endpoints)\n  - [Retries](#retries)\n  - [API Endpoints](#api-endpoints)\n  - [Models](#models)\n  - [OpenTelemetry](#opentelemetry)\n- [Contributing](#contributing)\n  - [Issues](#issues)\n  - [Pull Requests](#pull-requests)\n- [License](#license)\n\n## About\n\n[OpenFGA](https://openfga.dev) is an open source Fine-Grained Authorization solution inspired by [Google's Zanzibar paper](https://research.google/pubs/pub48190/). It was created by the FGA team at [Auth0](https://auth0.com) based on [Auth0 Fine-Grained Authorization (FGA)](https://fga.dev), available under [a permissive license (Apache-2)](https://github.com/openfga/rfcs/blob/main/LICENSE) and welcomes community contributions.\n\nOpenFGA is designed to make it easy for application builders to model their permission layer, and to add and integrate fine-grained authorization into their applications. OpenFGA’s design is optimized for reliability and low latency at a high scale.\n\n\n## Resources\n\n- [OpenFGA Documentation](https://openfga.dev/docs)\n- [OpenFGA API Documentation](https://openfga.dev/api/service)\n- [X](https://x.com/openfga)\n- [OpenFGA Community](https://openfga.dev/community)\n- [Zanzibar Academy](https://zanzibar.academy)\n- [Google's Zanzibar Paper (2019)](https://research.google/pubs/pub48190/)\n\n## Installation\n\nThe OpenFGA Java SDK is available on [Maven Central](https://central.sonatype.com/).\n\nThe OpenFGA Java SDK currently supports **Java 17** as the minimum JDK version.\n\nIt can be used with the following:\n\n* Gradle (Groovy)\n\n```groovy\nimplementation 'dev.openfga:openfga-sdk:0.9.6'\n```\n\n* Gradle (Kotlin)\n\n```kotlin\nimplementation(\"dev.openfga:openfga-sdk:0.9.6\")\n```\n\n* Apache Maven\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edev.openfga\u003c/groupId\u003e\n    \u003cartifactId\u003eopenfga-sdk\u003c/artifactId\u003e\n    \u003cversion\u003e0.9.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n* Ivy\n\n```xml\n\u003cdependency org=\"dev.openfga\" name=\"openfga-sdk\" rev=\"0.9.6\"/\u003e\n```\n\n* SBT\n\n```scala\nlibraryDependencies += \"dev.openfga\" % \"openfga-sdk\" % \"0.9.6\"\n```\n\n* Leiningen\n\n```edn\n[dev.openfga/openfga-sdk \"0.9.6\"]\n```\n\n\n## Getting Started\n\n### Initializing the API Client\n\n[Learn how to initialize your SDK](https://openfga.dev/docs/getting-started/setup-sdk-client)\n\nWe strongly recommend you initialize the `OpenFgaClient` only once and then re-use it throughout your app, otherwise you will incur the cost of having to re-initialize multiple times or at every request, the cost of reduced connection pooling and re-use, and would be particularly costly in the client credentials flow, as that flow will be preformed on every request.\n\n\u003e The `Client` will by default retry API requests up to 3 times. Rate limiting (429) errors are always retried. Server errors (5xx) are retried for all operations, with delay calculation using `Retry-After` headers when provided or exponential backoff as fallback.\n\n#### No Credentials\n\n```java\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport java.net.http.HttpClient;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        var config = new ClientConfiguration()\n                .apiUrl(System.getenv(\"FGA_API_URL\")) // If not specified, will default to \"http://localhost:8080\"\n                .storeId(System.getenv(\"FGA_STORE_ID\")) // Not required when calling createStore() or listStores()\n                .authorizationModelId(System.getenv(\"FGA_MODEL_ID\")); // Optional, can be overridden per request\n\n        var fgaClient = new OpenFgaClient(config);\n        var response = fgaClient.readAuthorizationModels().get();\n    }\n}\n```\n\n#### API Token\n\n```java\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ApiToken;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport dev.openfga.sdk.api.configuration.Credentials;\nimport java.net.http.HttpClient;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        var config = new ClientConfiguration()\n                .apiUrl(System.getenv(\"FGA_API_URL\")) // If not specified, will default to \"http://localhost:8080\"\n                .storeId(System.getenv(\"FGA_STORE_ID\")) // Not required when calling createStore() or listStores()\n                .authorizationModelId(System.getenv(\"FGA_MODEL_ID\")) // Optional, can be overridden per request\n                .credentials(new Credentials(\n                    new ApiToken(System.getenv(\"FGA_API_TOKEN\")) // will be passed as the \"Authorization: Bearer ${ApiToken}\" request header\n                ));\n\n        var fgaClient = new OpenFgaClient(config);\n        var response = fgaClient.readAuthorizationModels().get();\n    }\n}\n```\n\n#### Client Credentials\n\n```java\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport dev.openfga.sdk.api.configuration.ClientCredentials;\nimport dev.openfga.sdk.api.configuration.Credentials;\nimport java.net.http.HttpClient;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        var config = new ClientConfiguration()\n                .apiUrl(System.getenv(\"FGA_API_URL\")) // If not specified, will default to \"http://localhost:8080\"\n                .storeId(System.getenv(\"FGA_STORE_ID\")) // Not required when calling createStore() or listStores()\n                .authorizationModelId(System.getenv(\"FGA_MODEL_ID\")) // Optional, can be overridden per request\n                .credentials(new Credentials(\n                    new ClientCredentials()\n                            .apiTokenIssuer(System.getenv(\"FGA_API_TOKEN_ISSUER\"))\n                            .apiAudience(System.getenv(\"FGA_API_AUDIENCE\"))\n                            .clientId(System.getenv(\"FGA_CLIENT_ID\"))\n                            .clientSecret(System.getenv(\"FGA_CLIENT_SECRET\"))\n                ));\n\n        var fgaClient = new OpenFgaClient(config);\n        var response = fgaClient.readAuthorizationModels().get();\n    }\n}\n```\n\n#### Oauth2 Credentials\n\n```java\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport dev.openfga.sdk.api.configuration.ClientCredentials;\nimport dev.openfga.sdk.api.configuration.Credentials;\nimport java.net.http.HttpClient;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        var config = new ClientConfiguration()\n                .apiUrl(System.getenv(\"FGA_API_URL\")) // If not specified, will default to \"http://localhost:8080\"\n                .storeId(System.getenv(\"FGA_STORE_ID\")) // Not required when calling createStore() or listStores()\n                .authorizationModelId(System.getenv(\"FGA_MODEL_ID\")) // Optional, can be overridden per request\n                .credentials(new Credentials(\n                    new ClientCredentials()\n                            .apiTokenIssuer(System.getenv(\"FGA_API_TOKEN_ISSUER\"))\n                            .scopes(System.getenv(\"FGA_API_SCOPES\")) // optional space separated scopes\n                            .clientId(System.getenv(\"FGA_CLIENT_ID\"))\n                            .clientSecret(System.getenv(\"FGA_CLIENT_SECRET\"))\n                ));\n\n        var fgaClient = new OpenFgaClient(config);\n        var response = fgaClient.readAuthorizationModels().get();\n    }\n}\n```\n\n### Custom Headers\n\n#### Default Headers\n\nYou can set default headers to be sent with every request by using the `defaultHeaders` property of the `ClientConfiguration` class.\n\n```java\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\n\nimport java.net.http.HttpClient;\nimport java.util.Map;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        var config = new ClientConfiguration()\n                .apiUrl(System.getenv(\"FGA_API_URL\"))\n                .storeId(System.getenv(\"FGA_STORE_ID\"))\n                .authorizationModelId(System.getenv(\"FGA_MODEL_ID\"))\n                .defaultHeaders(Map.of(\n                        \"X-Custom-Header\", \"default-value\",\n                        \"X-Request-Source\", \"my-app\"\n                ));\n\n        var fgaClient = new OpenFgaClient(config);\n    }\n}\n```\n\n#### Per-request Headers\n\nYou can set custom headers to be sent with a specific request by using the `additionalHeaders` property of the options classes (e.g. `ClientReadOptions`, `ClientWriteOptions`, etc.).\n\n```java\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport java.net.http.HttpClient;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        var config = new ClientConfiguration()\n                .apiUrl(System.getenv(\"FGA_API_URL\"))\n                .storeId(System.getenv(\"FGA_STORE_ID\"))\n                .authorizationModelId(System.getenv(\"FGA_MODEL_ID\"))\n                .defaultHeaders(Map.of(\n                        \"X-Custom-Header\", \"default-value\",\n                        \"X-Request-Source\", \"my-app\"\n                ));\n\n        var fgaClient = new OpenFgaClient(config);\n        var options = new ClientReadOptions()\n                    .additionalHeaders(Map.of(\n                            \"X-Request-Id\", \"123e4567-e89b-12d3-a456-426614174000\",\n                            \"X-Custom-Header\", \"overridden-value\" // this will override the default value for this request only\n                    )\n                );\n        var response = fgaClient.read(request, options).get();\n    }\n}\n```\n\n\n### Get your Store ID\n\nYou need your store id to call the OpenFGA API (unless it is to call the [CreateStore](#create-store) or [ListStores](#list-stores) methods).\n\nIf your server is configured with [authentication enabled](https://openfga.dev/docs/getting-started/setup-openfga#configuring-authentication), you also need to have your credentials ready.\n\n### Calling the API\n\n#### Stores\n\n##### List Stores\n\nGet a paginated list of stores.\n\n[API Documentation](https://openfga.dev/api/service#/Stores/ListStores)\n\n\u003e Passing `ClientListStoresOptions` is optional. All fields of `ClientListStoresOptions` are optional.\n\n```java\nvar options = new ClientListStoresOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    .pageSize(10)\n    .continuationToken(\"...\");\nvar stores = fgaClient.listStores(options);\n\n// stores = [{ \"id\": \"01FQH7V8BEG3GPQW93KTRFR8JB\", \"name\": \"FGA Demo Store\", \"created_at\": \"2022-01-01T00:00:00.000Z\", \"updated_at\": \"2022-01-01T00:00:00.000Z\" }]\n```\n\n##### Create Store\n\nInitialize a store.\n\n[API Documentation](https://openfga.dev/api/service#/Stores/CreateStore)\n\n\u003e Passing `ClientCreateStoreOptions` is optional. All fields of `ClientCreateStoreOptions` are optional.\n\n```java\nvar request = new CreateStoreRequest().name(\"FGA Demo\");\nvar options = new ClientCreateStoreOptions().additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"));\nvar store = fgaClient.createStore(request, options).get();\n\n// store.getId() = \"01FQH7V8BEG3GPQW93KTRFR8JB\"\n\n// store the store.getId() in database\n\n// update the storeId of the client instance\nfgaClient.setStoreId(store.getId());\n\n// continue calling the API normally\n```\n\n##### Get Store\n\nGet information about the current store.\n\n[API Documentation](https://openfga.dev/api/service#/Stores/GetStore)\n\n\u003e Requires a client initialized with a storeId\n\n\u003e Passing `ClientGetStoreOptions` is optional. All fields of `ClientGetStoreOptions` are optional.\n\n```java\nvar options = new ClientGetStoreOptions().additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"));\nvar store = fgaClient.getStore(options).get();\n\n// store = { \"id\": \"01FQH7V8BEG3GPQW93KTRFR8JB\", \"name\": \"FGA Demo Store\", \"created_at\": \"2022-01-01T00:00:00.000Z\", \"updated_at\": \"2022-01-01T00:00:00.000Z\" }\n```\n\n##### Delete Store\n\nDelete a store.\n\n[API Documentation](https://openfga.dev/api/service#/Stores/DeleteStore)\n\n\u003e Requires a client initialized with a storeId\n\n\u003e Passing `ClientDeleteStoreOptions` is optional. All fields of `ClientDeleteStoreOptions` are optional.\n\n```java\nvar options = new ClientDeleteStoreOptions().additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"));\nvar store = fgaClient.deleteStore(options).get();\n```\n\n#### Authorization Models\n\n##### Read Authorization Models\n\nRead all authorization models in the store.\n\n[API Documentation](https://openfga.dev/api/service#/Authorization%20Models/ReadAuthorizationModels)\n\n\u003e Passing `ClientReadAuthorizationModelsOptions` is optional. All fields of `ClientReadAuthorizationModelsOptions` are optional.\n\n```java\nvar options = new ClientReadAuthorizationModelsOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    .pageSize(10)\n    .continuationToken(\"...\");\nvar response = fgaClient.readAuthorizationModels(options).get();\n\n// response.getAuthorizationModels() = [\n// { id: \"01GXSA8YR785C4FYS3C0RTG7B1\", schemaVersion: \"1.1\", typeDefinitions: [...] },\n// { id: \"01GXSBM5PVYHCJNRNKXMB4QZTW\", schemaVersion: \"1.1\", typeDefinitions: [...] }];\n```\n\n##### Write Authorization Model\n\nCreate a new authorization model.\n\n[API Documentation](https://openfga.dev/api/service#/Authorization%20Models/WriteAuthorizationModel)\n\n\u003e Note: To learn how to build your authorization model, check the Docs at https://openfga.dev/docs.\n\n\u003e Learn more about [the OpenFGA configuration language](https://openfga.dev/docs/configuration-language).\n\n\u003e You can use the OpenFGA [CLI](https://github.com/openfga/cli) or [Syntax Transformer](https://github.com/openfga/syntax-transformer) to convert between the OpenFGA DSL and the JSON authorization model.\n\n\u003e Passing `ClientWriteAuthorizationModelOptions` is optional. All fields of `ClientWriteAuthorizationModelOptions` are optional.\n\n```java\n\nvar request = new WriteAuthorizationModelRequest()\n    .schemaVersion(\"1.1\")\n    .typeDefinitions(List.of(\n        new TypeDefinition().type(\"user\").relations(Map.of()),\n        new TypeDefinition()\n            .type(\"document\")\n            .relations(Map.of(\n                \"writer\", new Userset(),\n                \"viewer\", new Userset().union(new Usersets()\n                    .child(List.of(\n                        new Userset(),\n                        new Userset().computedUserset(new ObjectRelation().relation(\"writer\"))\n                    ))\n                )\n            ))\n            .metadata(new Metadata()\n                .relations(Map.of(\n                    \"writer\", new RelationMetadata().directlyRelatedUserTypes(\n                        List.of(new RelationReference().type(\"user\"))\n                    ),\n                    \"viewer\", new RelationMetadata().directlyRelatedUserTypes(\n                        List.of(new RelationReference().type(\"user\"))\n                    )\n                ))\n            )\n    ));\nvar options = new ClientWriteAuthorizationModelOptions().additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"));\n\nvar response = fgaClient.writeAuthorizationModel(request, options).get();\n\n// response.getAuthorizationModelId() = \"01GXSA8YR785C4FYS3C0RTG7B1\"\n```\n\n#### Read a Single Authorization Model\n\nRead a particular authorization model.\n\n[API Documentation](https://openfga.dev/api/service#/Authorization%20Models/ReadAuthorizationModel)\n\n\u003e Passing `ClientReadAuthorizationModelOptions` is optional. All fields of `ClientReadAuthorizationModelOptions` are optional.\n\n```java\nvar options = new ClientReadAuthorizationModelOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\");\n\nvar response = fgaClient.readAuthorizationModel(options).get();\n\n// response.getAuthorizationModel().getId() = \"01GXSA8YR785C4FYS3C0RTG7B1\"\n// response.getAuthorizationModel().getSchemaVersion() = \"1.1\"\n// response.getAuthorizationModel().getTypeDefinitions() = [{ \"type\": \"document\", \"relations\": { ... } }, { \"type\": \"user\", \"relations\": { ... }}]\n```\n\n##### Read the Latest Authorization Model\n\nReads the latest authorization model (note: this ignores the model id in configuration).\n\n[API Documentation](https://openfga.dev/api/service#/Authorization%20Models/ReadAuthorizationModel)\n\n\u003e Passing `ClientReadLatestAuthorizationModelOptions` is optional. All fields of `ClientReadLatestAuthorizationModelOptions` are optional.\n\n```java\nvar options = new ClientReadLatestAuthorizationModelOptions().additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"));\nvar response = fgaClient.readLatestAuthorizationModel(options).get();\n\n// response.getAuthorizationModel().getId() = \"01GXSA8YR785C4FYS3C0RTG7B1\"\n// response.getAuthorizationModel().SchemaVersion() = \"1.1\"\n// response.getAuthorizationModel().TypeDefinitions() = [{ \"type\": \"document\", \"relations\": { ... } }, { \"type\": \"user\", \"relations\": { ... }}]\n```\n\n#### Relationship Tuples\n\n##### Read Relationship Tuple Changes (Watch)\n\nReads the list of historical relationship tuple writes and deletes.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Tuples/ReadChanges)\n\n\u003e Passing `ClientReadChangesOptions` is optional. All fields of `ClientReadChangesOptions` are optional.\n\n```java\nvar startTime = OffsetDateTime.parse(\"2022-01-01T00:00:00+00:00\");\nvar request = new ClientReadChangesRequest().type(\"document\").startTime(startTime);\nvar options = new ClientReadChangesOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    .pageSize(10)\n    .continuationToken(\"...\");\n\nvar response = fgaClient.readChanges(request, options).get();\n\n// response.getContinuationToken() = ...\n// response.getChanges() = [\n//   { tupleKey: { user, relation, object }, operation: TupleOperation.WRITE, timestamp: ... },\n//   { tupleKey: { user, relation, object }, operation: TupleOperation.DELETE, timestamp: ... }\n// ]\n```\n\n##### Read Relationship Tuples\n\nReads the relationship tuples stored in the database. It does not evaluate nor exclude invalid tuples according to the authorization model.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Tuples/Read)\n\n\u003e Passing `ClientReadOptions` is optional. All fields of `ClientReadOptions` are optional.\n\n```java\n// Find if a relationship tuple stating that a certain user is a viewer of a certain document\nvar request = new ClientReadRequest()\n    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n    .relation(\"viewer\")\n    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\");\n\n// Find all relationship tuples where a certain user has a relationship as any relation to a certain document\nvar request = new ClientReadRequest()\n    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\");\n\n// Find all relationship tuples where a certain user is a viewer of any document\nvar request = new ClientReadRequest()\n    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n    .relation(\"viewer\")\n    ._object(\"document:\");\n\n// Find all relationship tuples where any user has a relationship as any relation with a particular document\nvar request = new ClientReadRequest()\n    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\");\n\n// Read all stored relationship tuples\nvar request = new ClientReadRequest();\n\nvar options = new ClientReadOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    .pageSize(10)\n    .continuationToken(\"...\");\n\nvar response = fgaClient.read(request, options).get();\n\n// In all the above situations, the response will be of the form:\n// response = { tuples: [{ key: { user, relation, object }, timestamp }, ...]}\n```\n\n##### Write (Create and Delete) Relationship Tuples\n\nCreate and/or delete relationship tuples to update the system state.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Tuples/Write)\n\n\u003e Passing `ClientWriteOptions` is optional. All fields of `ClientWriteOptions` are optional.\n\n###### Transaction mode (default)\n\nBy default, write runs in a transaction mode where any invalid operation (deleting a non-existing tuple, creating an existing tuple, one of the tuples was invalid) or a server error will fail the entire operation.\n\n```java\nvar request = new ClientWriteRequest()\n    .writes(List.of(\n        new TupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"viewer\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"),\n        new TupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"viewer\")\n            ._object(\"document:0192ab2d-d36e-7cb3-a4a8-5d1d67a300c5\")\n    ))\n    .deletes(List.of(\n        new TupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"writer\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n    ));\n\nvar options = new ClientWriteOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\")\n    .disableTransactions(false);\n\nvar response = fgaClient.write(request, options).get();\n```\n\nConvenience `WriteTuples` and `DeleteTuples` methods are also available.\n\n###### Non-transaction mode\n\nThe SDK will split the writes into separate requests and send them sequentially to avoid violating rate limits.\n\n\u003e Passing `ClientWriteOptions` with `.disableTransactions(true)` is required to use non-transaction mode.\n\u003e All other fields of `ClientWriteOptions` are optional.\n\n```java\nvar request = new ClientWriteRequest()\n    .writes(List.of(\n        new ClientTupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"viewer\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"),\n        new ClientTupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"viewer\")\n            ._object(\"document:0192ab2d-d36e-7cb3-a4a8-5d1d67a300c5\")\n    ))\n    .deletes(List.of(\n        new ClientTupleKeyWithoutCondition()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"writer\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n    ));\nvar options = new ClientWriteOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\")\n    .disableTransactions(true)\n    .transactionChunkSize(5); // Maximum number of requests to be sent in a transaction in a particular chunk\n\nvar response = fgaClient.write(request, options).get();\n```\n\n###### Conflict options for write operations\n\nWrite conflict handling can be controlled using the `onDuplicate` option for writes and the `onMissing` option for deletes.\n\n\u003e Note: this requires OpenFGA [v1.10.0](https://github.com/openfga/openfga/releases/tag/v1.10.0) or later.\n\n- `onDuplicate`: Controls behavior when attempting to create a tuple that already exists\n  - `WriteRequestWrites.OnDuplicateEnum.ERROR` (default): Return an error\n  - `WriteRequestWrites.OnDuplicateEnum.IGNORE`: Skip the duplicate tuple and continue\n  \n- `onMissing`: Controls behavior when attempting to delete a tuple that doesn't exist\n  - `WriteRequestDeletes.OnMissingEnum.ERROR` (default): Return an error\n  - `WriteRequestDeletes.OnMissingEnum.IGNORE`: Skip the missing tuple and continue\n\n**Using conflict options with the `write()` method:**\n\n```java\nvar request = new ClientWriteRequest()\n    .writes(List.of(\n        new ClientTupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"viewer\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n    ))\n    .deletes(List.of(\n        new ClientTupleKeyWithoutCondition()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"writer\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n    ));\n\nvar options = new ClientWriteOptions()\n    .onDuplicate(WriteRequestWrites.OnDuplicateEnum.IGNORE)\n    .onMissing(WriteRequestDeletes.OnMissingEnum.IGNORE);\n\nvar response = fgaClient.write(request, options).get();\n```\n\n**Using conflict options with the `writeTuples()` convenience method:**\n\n```java\nvar tuples = List.of(\n    new ClientTupleKey()\n        .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n        .relation(\"viewer\")\n        ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n);\n\nvar options = new ClientWriteTuplesOptions()\n    .onDuplicate(WriteRequestWrites.OnDuplicateEnum.IGNORE);\n\nvar response = fgaClient.writeTuples(tuples, options).get();\n```\n\n**Using conflict options with the `deleteTuples()` convenience method:**\n\n```java\nvar tuples = List.of(\n    new ClientTupleKeyWithoutCondition()\n        .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n        .relation(\"writer\")\n        ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n);\n\nvar options = new ClientDeleteTuplesOptions()\n    .onMissing(WriteRequestDeletes.OnMissingEnum.IGNORE);\n\nvar response = fgaClient.deleteTuples(tuples, options).get();\n```\n\n#### Relationship Queries\n\n##### Check\n\nCheck if a user has a particular relation with an object.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Queries/Check)\n\n\u003e Passing `ClientCheckOptions` is optional. All fields of `ClientCheckOptions` are optional.\n\n```java\nvar request = new ClientCheckRequest()\n    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n    .relation(\"writer\")\n    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\");\nvar options = new ClientCheckOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\");\n\nvar response = fgaClient.check(request, options).get();\n// response.getAllowed() = true\n```\n\n##### Batch Check\n\nSimilar to [check](#check), but instead of checking a single user-object relationship, accepts a list of relationships to check. Requires OpenFGA version 1.8.0 or greater.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Queries/BatchCheck)\n\n\u003e **Note**: The order of `batchCheck` results is not guaranteed to match the order of the checks provided. Use `correlationId` to pair responses with requests.\n\n\u003e Passing `ClientBatchCheckOptions` is optional. All fields of `ClientBatchCheckOptions` are optional.\n\n```java\nvar request = new ClientBatchCheckRequest().checks(\n    List.of(\n        new ClientBatchCheckItem()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"viewer\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n            .correlationId(\"cor-1\") // optional, one will be generated for you if not provided\n            .contextualTuples(List.of(\n                new ClientTupleKey()\n                    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n                    .relation(\"editor\")\n                    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n            )),\n        new ClientCheckRequest()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"admin\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"),\n            .correlationId(\"cor-2\") // optional, one will be generated for you if not provided\n            .contextualTuples(List.of(\n                new ClientTupleKey()\n                    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n                    .relation(\"editor\")\n                    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n            )),\n        new ClientCheckRequest()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"creator\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n            .correlationId(\"cor-3\"), // optional, one will be generated for you if not provided\n        new ClientCheckRequest()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"deleter\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n            .correlationId(\"cor-4\") // optional, one will be generated for you if not provided\n        )\n);\n\nvar options = new ClientBatchCheckOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\")\n    .maxParallelRequests(5); // Max number of requests to issue in parallel, defaults to 10 \n    .maxBatchSize(20); // Max number of batches to split the list of checks into, defaults to 50\n\nvar response = fgaClient.batchCheck(request, options).get();\n\n/*\nresponse.getResult() = [{\n    allowed: false,\n    correlationId: \"cor-1\",\n    request: {\n      user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n      relation: \"viewer\",\n      _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n      correlationId: \"cor-1\",\n      contextualTuples: [{\n        user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n        relation: \"editor\",\n        _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"\n      }]\n    },\n  },\n  {\n    allowed: false,\n    correlationId: \"cor-2\",\n    request: {\n      user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n      relation: \"admin\",\n      _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n      correlationId: \"cor-2\",\n      contextualTuples: [{\n        user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n        relation: \"editor\",\n        _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"\n      }]\n    }\n  },\n  {\n    allowed: false,\n    correlationId: \"cor-3\",\n    request: {\n      user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n      relation: \"creator\",\n      _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n      correlationId: \"cor-3\",\n    },\n    error: \u003cFgaError ...\u003e\n  },\n  {\n    allowed: true,\n    correlationId: \"cor-4\",\n    request: {\n      user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n      relation: \"deleter\",\n      _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n      correlationId: \"cor-4\",\n    }\n  },\n]\n*/\n```\n\nIf you are using an OpenFGA version less than 1.8.0, you can use `clientBatchCheck`, \nwhich calls `check` in parallel. It will return `allowed: false` if it encounters an error, and will return the error in the body.\nIf 429s are encountered, the underlying check will retry up to 3 times. For 5xx errors, all requests will retry with delay calculation using `Retry-After` headers when provided or exponential backoff as fallback.\n\n```\nvar request = List.of(\n    new ClientBatchCheckItem()\n        .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n        .relation(\"viewer\")\n        ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n        .contextualTuples(List.of(\n            new ClientTupleKey()\n                .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n                .relation(\"editor\")\n                ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n        )),\n    new ClientCheckRequest()\n        .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n        .relation(\"admin\")\n        ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"),\n        .contextualTuples(List.of(\n            new ClientTupleKey()\n                .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n                .relation(\"editor\")\n                ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n        )),\n    new ClientCheckRequest()\n        .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n        .relation(\"creator\")\n        ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"),\n    new ClientCheckRequest()\n        .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n        .relation(\"deleter\")\n        ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n);\nvar options = new ClientBatchCheckClientOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\")\n    .maxParallelRequests(5); // Max number of requests to issue in parallel, defaults to 10\n\nvar response = fgaClient.batchCheck(request, options).get();\n\n/*\nresponse.getResponses() = [{\n  allowed: false,\n  request: {\n    user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n    relation: \"viewer\",\n    _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n    contextualTuples: [{\n      user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n      relation: \"editor\",\n      _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"\n    }]\n  }\n}, {\n  allowed: false,\n  request: {\n    user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n    relation: \"admin\",\n    _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n    contextualTuples: [{\n      user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n      relation: \"editor\",\n      _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"\n    }]\n  }\n}, {\n  allowed: false,\n  request: {\n    user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n    relation: \"creator\",\n    _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n  },\n  error: \u003cFgaError ...\u003e\n}, {\n  allowed: true,\n  request: {\n    user: \"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\n    relation: \"deleter\",\n    _object: \"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\",\n  }},\n]\n*/\n```\n\n##### Expand\n\nExpands the relationships in userset tree format.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Queries/Expand)\n\n\u003e Passing `ClientExpandOptions` is optional. All fields of `ClientExpandOptions` are optional.\n\n```java\nvar request = new ClientExpandRequest()\n    .relation(\"viewer\")\n    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\");\nvar options = new ClientExpandOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\");\n\nvar response = fgaClient.expand(request, options).get();\n\n// response.getTree().getRoot() = {\"name\":\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a#viewer\",\"leaf\":{\"users\":{\"users\":[\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\",\"user:f52a4f7a-054d-47ff-bb6e-3ac81269988f\"]}}}\n```\n\n##### List Objects\n\nList the objects of a particular type a user has access to.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Queries/ListObjects)\n\n\u003e Passing `ClientListObjectsOptions` is optional. All fields of `ClientListObjectsOptions` are optional.\n\n```java\nvar request = new ClientListObjectsRequest()\n    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n    .relation(\"viewer\")\n    .type(\"document\")\n    .contextualTuples(List.of(\n        new ClientTupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"writer\")\n            ._object(\"document:0192ab2d-d36e-7cb3-a4a8-5d1d67a300c5\")\n    ));\nvar options = new ClientListObjectsOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\");\n\nvar response = fgaClient.listObjects(request, options).get();\n\n// response.getObjects() = [\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\"]\n```\n\n##### List Relations\n\nList the relations a user has on an object.\n\n\u003e Passing `ClientListRelationsOptions` is optional. All fields of `ClientListRelationsOptions` are optional.\n\n```java\nvar request = new ClientListRelationsRequest()\n    .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n    ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n    .relations(List.of(\"can_view\", \"can_edit\", \"can_delete\", \"can_rename\"))\n    .contextualTuples(List.of(\n        new ClientTupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"editor\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n        )\n    );\nvar options = new ClientListRelationsOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // When unspecified, defaults to 10\n    .maxParallelRequests()\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(DEFAULT_AUTH_MODEL_ID);\n\nvar response = fgaClient.listRelations(request, options).get();\n\n// response.getRelations() = [\"can_view\", \"can_edit\"]\n```\n\n##### List Users\n\nList the users who have a certain relation to a particular type.\n\n[API Documentation](https://openfga.dev/api/service#/Relationship%20Queries/ListUsers)\n\n```java\n// Only a single filter is allowed for the time being\nvar userFilters = new ArrayList\u003cUserTypeFilter\u003e() {\n    {\n        add(new UserTypeFilter().type(\"user\"));\n        // user filters can also be of the form\n        // add(new UserTypeFilter().type(\"team\").relation(\"member\"));\n    }\n};\n\nvar request = new ClientListUsersRequest()\n    ._object(new FgaObject().type(\"document\").id(\"roadmap\"))\n    .relation(\"can_read\")\n    .userFilters(userFilters)\n    .context(Map.of(\"view_count\", 100))\n    .contextualTupleKeys(List.of(\n        new ClientTupleKey()\n            .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n            .relation(\"editor\")\n            ._object(\"folder:product\"),\n        new ClientTupleKey()\n            .user(\"folder:product\")\n            .relation(\"parent\")\n            ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n));\n\nvar options = new ClientListUsersOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\");\n\nvar response = fgaClient.listUsers(request, options).get();\n\n// response.getUsers() = [{object: {type: \"user\", id: \"81684243-9356-4421-8fbf-a4f8d36aa31b\"}}, {userset: { type: \"user\" }}, ...]\n```\n\n#### Assertions\n\n##### Read Assertions\n\nRead assertions for a particular authorization model.\n\n[API Documentation](https://openfga.dev/api/service#/Assertions/Read%20Assertions)\n\n\u003e Passing `ClientReadAssertionsOptions` is optional. All fields of `ClientReadAssertionsOptions` are optional.\n\n```java\nvar options = new ClientReadAssertionsOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    // You can rely on the model id set in the configuration or override it for this specific request\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\");\nvar response = fgaClient.readAssertions(options).get();\n```\n\n##### Write Assertions\n\nUpdate the assertions for a particular authorization model.\n\n[API Documentation](https://openfga.dev/api/service#/Assertions/Write%20Assertions)\n\n\u003e Passing `ClientWriteAssertionsOptions` is optional. All fields of `ClientWriteAssertionsOptions` are optional.\n\n```java\nvar options = new ClientWriteAssertionsOptions()\n    .additionalHeaders(Map.of(\"Some-Http-Header\", \"Some value\"))\n    .authorizationModelId(\"01GXSA8YR785C4FYS3C0RTG7B1\");\nvar assertions = List.of(\n    new ClientAssertion()\n        .user(\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\")\n        .relation(\"viewer\")\n        ._object(\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a\")\n        .expectation(true)\n);\nfgaClient.writeAssertions(assertions, options).get();\n```\n\n\n### Retries\n\nThe SDK implements RFC 9110 compliant retry behavior with support for the `Retry-After` header. By default, the SDK will automatically retry failed requests up to **3 times** with delay calculation (maximum allowable: 15 retries).\n\n#### Retry Behavior\n\n**Rate Limiting (429 errors):** Always retried regardless of HTTP method.\n\n**Server Errors (5xx):** All requests are retried on 5xx errors (except 501 Not Implemented) regardless of HTTP method:\n- **All operations** (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS): Always retried on 5xx errors with delay calculation\n\n#### Delay Calculation\n\n1. **Retry-After header present**: Uses the server-specified delay (supports both integer seconds and HTTP-date formats)\n2. **No Retry-After header**: Uses exponential backoff with jitter (base delay: 2^retryCount * 100ms, capped at 120 seconds)\n3. **Minimum delay**: Respects the configured `minimumRetryDelay` as a floor value\n\n#### Configuration\n\nCustomize retry behavior using the `ClientConfiguration` builder. The SDK enforces a maximum of 15 retries to prevent accidental server overload:\n\n**⚠️ Breaking Changes:**\n- Configuration validation now prevents setting `maxRetries` above 15\n- `FgaError` now exposes the `Retry-After` header value via `getRetryAfterHeader()`\n\n```java\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport java.net.http.HttpClient;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        var config = new ClientConfiguration()\n                .apiUrl(System.getenv(\"FGA_API_URL\")) // If not specified, will default to \"http://localhost:8080\"\n                .storeId(System.getenv(\"FGA_STORE_ID\")) // Not required when calling createStore() or listStores()\n                .authorizationModelId(System.getenv(\"FGA_MODEL_ID\")) // Optional, can be overridden per request\n                .maxRetries(3) // retry up to 3 times on API requests (default: 3, maximum: 15)\n                .minimumRetryDelay(Duration.ofMillis(100)); // minimum wait time between retries in milliseconds (default: 100ms)\n\n        var fgaClient = new OpenFgaClient(config);\n        var response = fgaClient.readAuthorizationModels().get();\n    }\n}\n```\n\n#### Error Handling with Retry Information\n\nWhen handling errors, you can access the `Retry-After` header value for debugging or custom retry logic:\n\n```java\ntry {\n    var response = fgaClient.check(request).get();\n} catch (ExecutionException e) {\n    if (e.getCause() instanceof FgaError) {\n        FgaError error = (FgaError) e.getCause();\n        \n        // Access Retry-After header if present\n        String retryAfter = error.getRetryAfterHeader();\n        if (retryAfter != null) {\n            System.out.println(\"Server requested retry after: \" + retryAfter + \" seconds\");\n        }\n        \n        System.out.println(\"Error: \" + error.getMessage());\n    }\n}\n```\n\n### Calling Other Endpoints\n\nThe API Executor provides direct HTTP access to OpenFGA endpoints not yet wrapped by the SDK. It maintains the SDK's client configuration including authentication, telemetry, retries, and error handling.\n\nUse cases:\n- Calling endpoints not yet supported by the SDK\n- Using an SDK version that lacks support for a particular endpoint\n- Accessing custom endpoints that extend the OpenFGA API\n\nInitialize the SDK normally and access the API Executor via the `fgaClient` instance:\n\n```java\n// Initialize the client, same as above\nClientConfiguration config = new ClientConfiguration()\n    .apiUrl(\"http://localhost:8080\")\n    .storeId(\"01YCP46JKYM8FJCQ37NMBYHE5X\");\nOpenFgaClient fgaClient = new OpenFgaClient(config);\n\n// Custom new endpoint that doesn't exist in the SDK yet\nMap\u003cString, Object\u003e requestBody = Map.of(\n    \"user\", \"user:bob\",\n    \"action\", \"custom_action\",\n    \"resource\", \"resource:123\"\n);\n\n// Build the request\nApiExecutorRequestBuilder request = ApiExecutorRequestBuilder.builder(\"POST\", \"/stores/{store_id}/custom-endpoint\")\n    .pathParam(\"store_id\", storeId)\n    .queryParam(\"page_size\", \"20\")\n    .queryParam(\"continuation_token\", \"eyJwayI6...\")\n    .body(requestBody)\n    .header(\"X-Experimental-Feature\", \"enabled\")\n    .build();\n```\n\n#### Example: Calling a new \"Custom Endpoint\" endpoint and handling raw response\n\n```java\n// Get raw response without automatic decoding\nApiResponse\u003cString\u003e rawResponse = fgaClient.apiExecutor().send(request).get();\n\nString rawJson = rawResponse.getData();\nSystem.out.println(\"Response: \" + rawJson);\n\n// You can access fields like headers, status code, etc. from rawResponse:\nSystem.out.println(\"Status Code: \" + rawResponse.getStatusCode());\nSystem.out.println(\"Headers: \" + rawResponse.getHeaders());\n```\n\n#### Example: Calling a new \"Custom Endpoint\" endpoint and decoding response into a struct\n\n```java\n// Define a class to hold the response\nclass CustomEndpointResponse {\n    private boolean allowed;\n    private String reason;\n    \n    public boolean isAllowed() { return allowed; }\n    public void setAllowed(boolean allowed) { this.allowed = allowed; }\n    public String getReason() { return reason; }\n    public void setReason(String reason) { this.reason = reason; }\n}\n\n// Get response decoded into CustomEndpointResponse class\nApiResponse\u003cCustomEndpointResponse\u003e response = fgaClient.apiExecutor()\n    .send(request, CustomEndpointResponse.class)\n    .get();\n\nCustomEndpointResponse customEndpointResponse = response.getData();\nSystem.out.println(\"Allowed: \" + customEndpointResponse.isAllowed());\nSystem.out.println(\"Reason: \" + customEndpointResponse.getReason());\n\n// You can access fields like headers, status code, etc. from response:\nSystem.out.println(\"Status Code: \" + response.getStatusCode());\nSystem.out.println(\"Headers: \" + response.getHeaders());\n```\n\nFor a complete working example, see [examples/api-executor](examples/api-executor).\n\n#### Documentation\n\nSee [docs/ApiExecutor.md](docs/ApiExecutor.md) for complete API reference and examples.\n\n### API Endpoints\n\n| Method | HTTP request | Description |\n| ------------- | ------------- | ------------- |\n| [**batchCheck**](docs/OpenFgaApi.md#batchcheck) | **POST** /stores/{store_id}/batch-check | Send a list of \u0026#x60;check\u0026#x60; operations in a single request |\n| [**check**](docs/OpenFgaApi.md#check) | **POST** /stores/{store_id}/check | Check whether a user is authorized to access an object |\n| [**createStore**](docs/OpenFgaApi.md#createstore) | **POST** /stores | Create a store |\n| [**deleteStore**](docs/OpenFgaApi.md#deletestore) | **DELETE** /stores/{store_id} | Delete a store |\n| [**expand**](docs/OpenFgaApi.md#expand) | **POST** /stores/{store_id}/expand | Expand all relationships in userset tree format, and following userset rewrite rules.  Useful to reason about and debug a certain relationship |\n| [**getStore**](docs/OpenFgaApi.md#getstore) | **GET** /stores/{store_id} | Get a store |\n| [**listObjects**](docs/OpenFgaApi.md#listobjects) | **POST** /stores/{store_id}/list-objects | List all objects of the given type that the user has a relation with |\n| [**listStores**](docs/OpenFgaApi.md#liststores) | **GET** /stores | List all stores |\n| [**listUsers**](docs/OpenFgaApi.md#listusers) | **POST** /stores/{store_id}/list-users | List the users matching the provided filter who have a certain relation to a particular type. |\n| [**read**](docs/OpenFgaApi.md#read) | **POST** /stores/{store_id}/read | Get tuples from the store that matches a query, without following userset rewrite rules |\n| [**readAssertions**](docs/OpenFgaApi.md#readassertions) | **GET** /stores/{store_id}/assertions/{authorization_model_id} | Read assertions for an authorization model ID |\n| [**readAuthorizationModel**](docs/OpenFgaApi.md#readauthorizationmodel) | **GET** /stores/{store_id}/authorization-models/{id} | Return a particular version of an authorization model |\n| [**readAuthorizationModels**](docs/OpenFgaApi.md#readauthorizationmodels) | **GET** /stores/{store_id}/authorization-models | Return all the authorization models for a particular store |\n| [**readChanges**](docs/OpenFgaApi.md#readchanges) | **GET** /stores/{store_id}/changes | Return a list of all the tuple changes |\n| [**streamedListObjects**](docs/OpenFgaApi.md#streamedlistobjects) | **POST** /stores/{store_id}/streamed-list-objects | Stream all objects of the given type that the user has a relation with |\n| [**write**](docs/OpenFgaApi.md#write) | **POST** /stores/{store_id}/write | Add or delete tuples from the store |\n| [**writeAssertions**](docs/OpenFgaApi.md#writeassertions) | **PUT** /stores/{store_id}/assertions/{authorization_model_id} | Upsert assertions for an authorization model ID |\n| [**writeAuthorizationModel**](docs/OpenFgaApi.md#writeauthorizationmodel) | **POST** /stores/{store_id}/authorization-models | Create a new authorization model |\n\n\n\n### Models\n\n\n- [AbortedMessageResponse](https://github.com/openfga/java-sdk/blob/main/docs/AbortedMessageResponse.md)\n\n- [Any](https://github.com/openfga/java-sdk/blob/main/docs/Any.md)\n\n- [Assertion](https://github.com/openfga/java-sdk/blob/main/docs/Assertion.md)\n\n- [AssertionTupleKey](https://github.com/openfga/java-sdk/blob/main/docs/AssertionTupleKey.md)\n\n- [AuthErrorCode](https://github.com/openfga/java-sdk/blob/main/docs/AuthErrorCode.md)\n\n- [AuthorizationModel](https://github.com/openfga/java-sdk/blob/main/docs/AuthorizationModel.md)\n\n- [BatchCheckItem](https://github.com/openfga/java-sdk/blob/main/docs/BatchCheckItem.md)\n\n- [BatchCheckRequest](https://github.com/openfga/java-sdk/blob/main/docs/BatchCheckRequest.md)\n\n- [BatchCheckResponse](https://github.com/openfga/java-sdk/blob/main/docs/BatchCheckResponse.md)\n\n- [BatchCheckSingleResult](https://github.com/openfga/java-sdk/blob/main/docs/BatchCheckSingleResult.md)\n\n- [CheckError](https://github.com/openfga/java-sdk/blob/main/docs/CheckError.md)\n\n- [CheckRequest](https://github.com/openfga/java-sdk/blob/main/docs/CheckRequest.md)\n\n- [CheckRequestTupleKey](https://github.com/openfga/java-sdk/blob/main/docs/CheckRequestTupleKey.md)\n\n- [CheckResponse](https://github.com/openfga/java-sdk/blob/main/docs/CheckResponse.md)\n\n- [Computed](https://github.com/openfga/java-sdk/blob/main/docs/Computed.md)\n\n- [Condition](https://github.com/openfga/java-sdk/blob/main/docs/Condition.md)\n\n- [ConditionMetadata](https://github.com/openfga/java-sdk/blob/main/docs/ConditionMetadata.md)\n\n- [ConditionParamTypeRef](https://github.com/openfga/java-sdk/blob/main/docs/ConditionParamTypeRef.md)\n\n- [ConsistencyPreference](https://github.com/openfga/java-sdk/blob/main/docs/ConsistencyPreference.md)\n\n- [ContextualTupleKeys](https://github.com/openfga/java-sdk/blob/main/docs/ContextualTupleKeys.md)\n\n- [CreateStoreRequest](https://github.com/openfga/java-sdk/blob/main/docs/CreateStoreRequest.md)\n\n- [CreateStoreResponse](https://github.com/openfga/java-sdk/blob/main/docs/CreateStoreResponse.md)\n\n- [Difference](https://github.com/openfga/java-sdk/blob/main/docs/Difference.md)\n\n- [ErrorCode](https://github.com/openfga/java-sdk/blob/main/docs/ErrorCode.md)\n\n- [ExpandRequest](https://github.com/openfga/java-sdk/blob/main/docs/ExpandRequest.md)\n\n- [ExpandRequestTupleKey](https://github.com/openfga/java-sdk/blob/main/docs/ExpandRequestTupleKey.md)\n\n- [ExpandResponse](https://github.com/openfga/java-sdk/blob/main/docs/ExpandResponse.md)\n\n- [FgaObject](https://github.com/openfga/java-sdk/blob/main/docs/FgaObject.md)\n\n- [ForbiddenResponse](https://github.com/openfga/java-sdk/blob/main/docs/ForbiddenResponse.md)\n\n- [GetStoreResponse](https://github.com/openfga/java-sdk/blob/main/docs/GetStoreResponse.md)\n\n- [InternalErrorCode](https://github.com/openfga/java-sdk/blob/main/docs/InternalErrorCode.md)\n\n- [InternalErrorMessageResponse](https://github.com/openfga/java-sdk/blob/main/docs/InternalErrorMessageResponse.md)\n\n- [Leaf](https://github.com/openfga/java-sdk/blob/main/docs/Leaf.md)\n\n- [ListObjectsRequest](https://github.com/openfga/java-sdk/blob/main/docs/ListObjectsRequest.md)\n\n- [ListObjectsResponse](https://github.com/openfga/java-sdk/blob/main/docs/ListObjectsResponse.md)\n\n- [ListStoresResponse](https://github.com/openfga/java-sdk/blob/main/docs/ListStoresResponse.md)\n\n- [ListUsersRequest](https://github.com/openfga/java-sdk/blob/main/docs/ListUsersRequest.md)\n\n- [ListUsersResponse](https://github.com/openfga/java-sdk/blob/main/docs/ListUsersResponse.md)\n\n- [Metadata](https://github.com/openfga/java-sdk/blob/main/docs/Metadata.md)\n\n- [Node](https://github.com/openfga/java-sdk/blob/main/docs/Node.md)\n\n- [Nodes](https://github.com/openfga/java-sdk/blob/main/docs/Nodes.md)\n\n- [NotFoundErrorCode](https://github.com/openfga/java-sdk/blob/main/docs/NotFoundErrorCode.md)\n\n- [NullValue](https://github.com/openfga/java-sdk/blob/main/docs/NullValue.md)\n\n- [ObjectRelation](https://github.com/openfga/java-sdk/blob/main/docs/ObjectRelation.md)\n\n- [PathUnknownErrorMessageResponse](https://github.com/openfga/java-sdk/blob/main/docs/PathUnknownErrorMessageResponse.md)\n\n- [ReadAssertionsResponse](https://github.com/openfga/java-sdk/blob/main/docs/ReadAssertionsResponse.md)\n\n- [ReadAuthorizationModelResponse](https://github.com/openfga/java-sdk/blob/main/docs/ReadAuthorizationModelResponse.md)\n\n- [ReadAuthorizationModelsResponse](https://github.com/openfga/java-sdk/blob/main/docs/ReadAuthorizationModelsResponse.md)\n\n- [ReadChangesResponse](https://github.com/openfga/java-sdk/blob/main/docs/ReadChangesResponse.md)\n\n- [ReadRequest](https://github.com/openfga/java-sdk/blob/main/docs/ReadRequest.md)\n\n- [ReadRequestTupleKey](https://github.com/openfga/java-sdk/blob/main/docs/ReadRequestTupleKey.md)\n\n- [ReadResponse](https://github.com/openfga/java-sdk/blob/main/docs/ReadResponse.md)\n\n- [RelationMetadata](https://github.com/openfga/java-sdk/blob/main/docs/RelationMetadata.md)\n\n- [RelationReference](https://github.com/openfga/java-sdk/blob/main/docs/RelationReference.md)\n\n- [RelationshipCondition](https://github.com/openfga/java-sdk/blob/main/docs/RelationshipCondition.md)\n\n- [SourceInfo](https://github.com/openfga/java-sdk/blob/main/docs/SourceInfo.md)\n\n- [Status](https://github.com/openfga/java-sdk/blob/main/docs/Status.md)\n\n- [Store](https://github.com/openfga/java-sdk/blob/main/docs/Store.md)\n\n- [StreamResultOfStreamedListObjectsResponse](https://github.com/openfga/java-sdk/blob/main/docs/StreamResultOfStreamedListObjectsResponse.md)\n\n- [StreamedListObjectsResponse](https://github.com/openfga/java-sdk/blob/main/docs/StreamedListObjectsResponse.md)\n\n- [Tuple](https://github.com/openfga/java-sdk/blob/main/docs/Tuple.md)\n\n- [TupleChange](https://github.com/openfga/java-sdk/blob/main/docs/TupleChange.md)\n\n- [TupleKey](https://github.com/openfga/java-sdk/blob/main/docs/TupleKey.md)\n\n- [TupleKeyWithoutCondition](https://github.com/openfga/java-sdk/blob/main/docs/TupleKeyWithoutCondition.md)\n\n- [TupleOperation](https://github.com/openfga/java-sdk/blob/main/docs/TupleOperation.md)\n\n- [TupleToUserset](https://github.com/openfga/java-sdk/blob/main/docs/TupleToUserset.md)\n\n- [TypeDefinition](https://github.com/openfga/java-sdk/blob/main/docs/TypeDefinition.md)\n\n- [TypeName](https://github.com/openfga/java-sdk/blob/main/docs/TypeName.md)\n\n- [TypedWildcard](https://github.com/openfga/java-sdk/blob/main/docs/TypedWildcard.md)\n\n- [UnauthenticatedResponse](https://github.com/openfga/java-sdk/blob/main/docs/UnauthenticatedResponse.md)\n\n- [UnprocessableContentErrorCode](https://github.com/openfga/java-sdk/blob/main/docs/UnprocessableContentErrorCode.md)\n\n- [UnprocessableContentMessageResponse](https://github.com/openfga/java-sdk/blob/main/docs/UnprocessableContentMessageResponse.md)\n\n- [User](https://github.com/openfga/java-sdk/blob/main/docs/User.md)\n\n- [UserTypeFilter](https://github.com/openfga/java-sdk/blob/main/docs/UserTypeFilter.md)\n\n- [Users](https://github.com/openfga/java-sdk/blob/main/docs/Users.md)\n\n- [Userset](https://github.com/openfga/java-sdk/blob/main/docs/Userset.md)\n\n- [UsersetTree](https://github.com/openfga/java-sdk/blob/main/docs/UsersetTree.md)\n\n- [UsersetTreeDifference](https://github.com/openfga/java-sdk/blob/main/docs/UsersetTreeDifference.md)\n\n- [UsersetTreeTupleToUserset](https://github.com/openfga/java-sdk/blob/main/docs/UsersetTreeTupleToUserset.md)\n\n- [UsersetUser](https://github.com/openfga/java-sdk/blob/main/docs/UsersetUser.md)\n\n- [Usersets](https://github.com/openfga/java-sdk/blob/main/docs/Usersets.md)\n\n- [ValidationErrorMessageResponse](https://github.com/openfga/java-sdk/blob/main/docs/ValidationErrorMessageResponse.md)\n\n- [WriteAssertionsRequest](https://github.com/openfga/java-sdk/blob/main/docs/WriteAssertionsRequest.md)\n\n- [WriteAuthorizationModelRequest](https://github.com/openfga/java-sdk/blob/main/docs/WriteAuthorizationModelRequest.md)\n\n- [WriteAuthorizationModelResponse](https://github.com/openfga/java-sdk/blob/main/docs/WriteAuthorizationModelResponse.md)\n\n- [WriteRequest](https://github.com/openfga/java-sdk/blob/main/docs/WriteRequest.md)\n\n- [WriteRequestDeletes](https://github.com/openfga/java-sdk/blob/main/docs/WriteRequestDeletes.md)\n\n- [WriteRequestWrites](https://github.com/openfga/java-sdk/blob/main/docs/WriteRequestWrites.md)\n\n\n\n### OpenTelemetry\n\nThis SDK supports producing metrics that can be consumed as part of an [OpenTelemetry](https://opentelemetry.io/) setup. For more information, please see [the documentation](https://github.com/openfga/java-sdk/blob/main/docs/OpenTelemetry.md)\n\n## Contributing\n\nSee [CONTRIBUTING](./CONTRIBUTING.md) for details.\n\n## Author\n\n[OpenFGA](https://github.com/openfga)\n\n## License\n\nThis project is licensed under the Apache-2.0 license. See the [LICENSE](https://github.com/openfga/java-sdk/blob/main/LICENSE) file for more info.\n\nThe code in this repo was auto generated by [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) from a template based on the [Java template](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/Java), licensed under the [Apache License 2.0](https://github.com/OpenAPITools/openapi-generator/blob/master/LICENSE).\n\n","funding_links":[],"categories":["\u003ca name=\"Java\"\u003e\u003c/a\u003eJava"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfga%2Fjava-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfga%2Fjava-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfga%2Fjava-sdk/lists"}