From 7a247f40c92f1e3898be15bbc33543281183c2df Mon Sep 17 00:00:00 2001 From: Asaf Cohen Date: Sun, 14 May 2023 13:09:03 +0300 Subject: [PATCH] fix permit context error --- .../permit/sdk/api/ConditionSetRulesApi.java | 20 +++++------ .../io/permit/sdk/api/ConditionSetsApi.java | 18 +++++----- .../java/io/permit/sdk/api/ElementsApi.java | 2 +- .../io/permit/sdk/api/EnvironmentsApi.java | 20 +++++------ .../java/io/permit/sdk/api/ProjectsApi.java | 18 +++++----- .../sdk/api/ResourceActionGroupsApi.java | 16 ++++----- .../io/permit/sdk/api/ResourceActionsApi.java | 18 +++++----- .../permit/sdk/api/ResourceAttributesApi.java | 18 +++++----- .../java/io/permit/sdk/api/ResourcesApi.java | 20 +++++------ .../io/permit/sdk/api/RoleAssignmentsApi.java | 14 ++++---- src/main/java/io/permit/sdk/api/RolesApi.java | 22 ++++++------ .../java/io/permit/sdk/api/TenantsApi.java | 24 ++++++------- src/main/java/io/permit/sdk/api/UsersApi.java | 34 +++++++++---------- 13 files changed, 122 insertions(+), 122 deletions(-) diff --git a/src/main/java/io/permit/sdk/api/ConditionSetRulesApi.java b/src/main/java/io/permit/sdk/api/ConditionSetRulesApi.java index 9eb63b7..f830525 100644 --- a/src/main/java/io/permit/sdk/api/ConditionSetRulesApi.java +++ b/src/main/java/io/permit/sdk/api/ConditionSetRulesApi.java @@ -26,7 +26,7 @@ interface IConditionSetRulesApi { * @return An array of {@link ConditionSetRuleRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError; @@ -40,7 +40,7 @@ interface IConditionSetRulesApi { * @return An array of {@link ConditionSetRuleRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page) throws IOException, PermitApiError, PermitContextError; @@ -53,7 +53,7 @@ interface IConditionSetRulesApi { * @return An array of {@link ConditionSetRuleRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey) throws IOException, PermitApiError, PermitContextError; @@ -64,7 +64,7 @@ interface IConditionSetRulesApi { * @return The created {@link ConditionSetRuleRead} object. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOException, PermitApiError, PermitContextError; @@ -74,7 +74,7 @@ interface IConditionSetRulesApi { * @param rule The condition set rule to delete. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ void delete(ConditionSetRuleRemove rule) throws IOException, PermitApiError, PermitContextError; } @@ -123,7 +123,7 @@ private String getConditionSetRulesUrl(String url) { * @return An array of {@link ConditionSetRuleRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -166,7 +166,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri * @return An array of {@link ConditionSetRuleRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page) throws IOException, PermitApiError, PermitContextError { return this.list(userSetKey, permissionKey, resourceSetKey, page, 100); @@ -182,7 +182,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri * @return An array of {@link ConditionSetRuleRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey) throws IOException, PermitApiError, PermitContextError { return this.list(userSetKey, permissionKey, resourceSetKey, 1); @@ -195,7 +195,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri * @return The created {@link ConditionSetRuleRead} object. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -217,7 +217,7 @@ public ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOExcepti * @param rule The condition set rule to delete. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(ConditionSetRuleRemove rule) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/ConditionSetsApi.java b/src/main/java/io/permit/sdk/api/ConditionSetsApi.java index 7895c5a..a537c62 100644 --- a/src/main/java/io/permit/sdk/api/ConditionSetsApi.java +++ b/src/main/java/io/permit/sdk/api/ConditionSetsApi.java @@ -63,7 +63,7 @@ private String getConditionSetsUrl(String url) { * @return An array of {@link ConditionSetRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead[] list(int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -93,7 +93,7 @@ public ConditionSetRead[] list(int page, int perPage) throws IOException, Permit * @return An array of {@link ConditionSetRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead[] list(int page) throws IOException, PermitApiError, PermitContextError { return this.list(page, 100); @@ -105,7 +105,7 @@ public ConditionSetRead[] list(int page) throws IOException, PermitApiError, Per * @return An array of {@link ConditionSetRead} objects. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead[] list() throws IOException, PermitApiError, PermitContextError { return this.list(1); @@ -118,7 +118,7 @@ public ConditionSetRead[] list() throws IOException, PermitApiError, PermitConte * @return The {@link ConditionSetRead} object representing the condition set. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead get(String conditionSetKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -139,7 +139,7 @@ public ConditionSetRead get(String conditionSetKey) throws IOException, PermitAp * @return The {@link ConditionSetRead} object representing the condition set. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead getByKey(String conditionSetKey) throws IOException, PermitApiError, PermitContextError { return this.get(conditionSetKey); @@ -152,7 +152,7 @@ public ConditionSetRead getByKey(String conditionSetKey) throws IOException, Per * @return The {@link ConditionSetRead} object representing the condition set. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead getById(UUID conditionSetId) throws IOException, PermitApiError, PermitContextError { return this.get(conditionSetId.toString()); @@ -165,7 +165,7 @@ public ConditionSetRead getById(UUID conditionSetId) throws IOException, PermitA * @return The {@link ConditionSetRead} object representing the created condition set. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead create(ConditionSetCreate conditionSetData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -189,7 +189,7 @@ public ConditionSetRead create(ConditionSetCreate conditionSetData) throws IOExc * @return The {@link ConditionSetRead} object representing the updated condition set. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ConditionSetRead update(String conditionSetKey, ConditionSetUpdate conditionSetData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -211,7 +211,7 @@ public ConditionSetRead update(String conditionSetKey, ConditionSetUpdate condit * @param conditionSetKey The key of the condition set to delete. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String conditionSetKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/ElementsApi.java b/src/main/java/io/permit/sdk/api/ElementsApi.java index ca04679..f233b79 100644 --- a/src/main/java/io/permit/sdk/api/ElementsApi.java +++ b/src/main/java/io/permit/sdk/api/ElementsApi.java @@ -31,7 +31,7 @@ public ElementsApi(OkHttpClient client, PermitConfig config) { * @return The embedded login authentication session data. * @throws IOException If an I/O error occurs while sending the request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If the Permit context is not properly configured. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EmbeddedLoginRequestOutput loginAs(String userKey, String tenantKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/EnvironmentsApi.java b/src/main/java/io/permit/sdk/api/EnvironmentsApi.java index 9b82caf..d017471 100644 --- a/src/main/java/io/permit/sdk/api/EnvironmentsApi.java +++ b/src/main/java/io/permit/sdk/api/EnvironmentsApi.java @@ -66,7 +66,7 @@ private String getEnvironmentsUrl(String projectKey, String url) { * @return An array of EnvironmentRead objects representing the environments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead[] list(String projectKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.PROJECT_LEVEL_API_KEY); @@ -97,7 +97,7 @@ public EnvironmentRead[] list(String projectKey, int page, int perPage) throws I * @return An array of EnvironmentRead objects representing the environments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead[] list(String projectKey, int page) throws IOException, PermitApiError, PermitContextError { return this.list(projectKey, page, 100); @@ -110,7 +110,7 @@ public EnvironmentRead[] list(String projectKey, int page) throws IOException, P * @return An array of EnvironmentRead objects representing the environments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead[] list(String projectKey) throws IOException, PermitApiError, PermitContextError { return this.list(projectKey,1); @@ -124,7 +124,7 @@ public EnvironmentRead[] list(String projectKey) throws IOException, PermitApiEr * @return The EnvironmentRead object representing the environment. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead get(String projectKey, String environmentKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.PROJECT_LEVEL_API_KEY); @@ -147,7 +147,7 @@ public EnvironmentRead get(String projectKey, String environmentKey) throws IOEx * @return The EnvironmentRead object representing the environment. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead getByKey(String projectKey, String environmentKey) throws IOException, PermitApiError, PermitContextError { return this.get(projectKey, environmentKey); @@ -161,7 +161,7 @@ public EnvironmentRead getByKey(String projectKey, String environmentKey) throws * @return The EnvironmentRead object representing the environment. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead getById(UUID projectId, UUID environmentId) throws IOException, PermitApiError, PermitContextError { return this.get(projectId.toString(), environmentId.toString()); @@ -175,7 +175,7 @@ public EnvironmentRead getById(UUID projectId, UUID environmentId) throws IOExce * @return The EnvironmentRead object representing the created environment. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead create(String projectKey, EnvironmentCreate environmentData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.PROJECT_LEVEL_API_KEY); @@ -200,7 +200,7 @@ public EnvironmentRead create(String projectKey, EnvironmentCreate environmentDa * @return The EnvironmentRead object representing the updated environment. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead update(String projectKey, String environmentKey, EnvironmentUpdate environmentData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.PROJECT_LEVEL_API_KEY); @@ -230,7 +230,7 @@ public EnvironmentRead update(String projectKey, String environmentKey, Environm * @return The EnvironmentRead object representing the copied environment. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public EnvironmentRead copy(String projectKey, String environmentKey, EnvironmentCopy copyParams) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.PROJECT_LEVEL_API_KEY); @@ -253,7 +253,7 @@ public EnvironmentRead copy(String projectKey, String environmentKey, Environmen * @param environmentKey The environment key. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String projectKey, String environmentKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.PROJECT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/ProjectsApi.java b/src/main/java/io/permit/sdk/api/ProjectsApi.java index 3ea51f0..b1fe436 100644 --- a/src/main/java/io/permit/sdk/api/ProjectsApi.java +++ b/src/main/java/io/permit/sdk/api/ProjectsApi.java @@ -63,7 +63,7 @@ private String getProjectsUrl(String url) { * @return An array of ProjectRead objects representing the projects. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead[] list(int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); @@ -93,7 +93,7 @@ public ProjectRead[] list(int page, int perPage) throws IOException, PermitApiEr * @return An array of ProjectRead objects representing the projects. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead[] list(int page) throws IOException, PermitApiError, PermitContextError { return this.list(page, 100); @@ -105,7 +105,7 @@ public ProjectRead[] list(int page) throws IOException, PermitApiError, PermitCo * @return An array of ProjectRead objects representing the projects. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead[] list() throws IOException, PermitApiError, PermitContextError { return this.list(1); @@ -118,7 +118,7 @@ public ProjectRead[] list() throws IOException, PermitApiError, PermitContextErr * @return The ProjectRead object representing the project. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead get(String projectKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); @@ -140,7 +140,7 @@ public ProjectRead get(String projectKey) throws IOException, PermitApiError, Pe * @return The ProjectRead object representing the project. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead getByKey(String projectKey) throws IOException, PermitApiError, PermitContextError { return this.get(projectKey); @@ -153,7 +153,7 @@ public ProjectRead getByKey(String projectKey) throws IOException, PermitApiErro * @return The ProjectRead object representing the project. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead getById(UUID projectId) throws IOException, PermitApiError, PermitContextError { return this.get(projectId.toString()); @@ -166,7 +166,7 @@ public ProjectRead getById(UUID projectId) throws IOException, PermitApiError, P * @return The ProjectRead object representing the created project. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead create(ProjectCreate projectData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); @@ -190,7 +190,7 @@ public ProjectRead create(ProjectCreate projectData) throws IOException, PermitA * @return The ProjectRead object representing the updated project. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ProjectRead update(String projectKey, ProjectUpdate projectData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); @@ -212,7 +212,7 @@ public ProjectRead update(String projectKey, ProjectUpdate projectData) throws I * @param projectKey The project key. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String projectKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/ResourceActionGroupsApi.java b/src/main/java/io/permit/sdk/api/ResourceActionGroupsApi.java index e6a6bb0..6f615e6 100644 --- a/src/main/java/io/permit/sdk/api/ResourceActionGroupsApi.java +++ b/src/main/java/io/permit/sdk/api/ResourceActionGroupsApi.java @@ -66,7 +66,7 @@ private String getResourceActionGroupsUrl(String resourceKey, String url) { * @return An array of {@link ResourceActionGroupRead} objects representing the action groups. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionGroupRead[] list(String resourceKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -97,7 +97,7 @@ public ResourceActionGroupRead[] list(String resourceKey, int page, int perPage) * @return An array of {@link ResourceActionGroupRead} objects representing the action groups. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionGroupRead[] list(String resourceKey, int page) throws IOException, PermitApiError, PermitContextError { return this.list(resourceKey, page, 100); @@ -110,7 +110,7 @@ public ResourceActionGroupRead[] list(String resourceKey, int page) throws IOExc * @return An array of {@link ResourceActionGroupRead} objects representing the action groups. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionGroupRead[] list(String resourceKey) throws IOException, PermitApiError, PermitContextError { return this.list(resourceKey,1); @@ -124,7 +124,7 @@ public ResourceActionGroupRead[] list(String resourceKey) throws IOException, Pe * @return The {@link ResourceActionGroupRead} object representing the action group. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionGroupRead get(String resourceKey, String groupKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -147,7 +147,7 @@ public ResourceActionGroupRead get(String resourceKey, String groupKey) throws I * @return The {@link ResourceActionGroupRead} object representing the action group. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionGroupRead getByKey(String resourceKey, String groupKey) throws IOException, PermitApiError, PermitContextError { return this.get(resourceKey, groupKey); @@ -161,7 +161,7 @@ public ResourceActionGroupRead getByKey(String resourceKey, String groupKey) thr * @return The {@link ResourceActionGroupRead} object representing the action group. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionGroupRead getById(UUID resourceId, UUID groupId) throws IOException, PermitApiError, PermitContextError { return this.get(resourceId.toString(), groupId.toString()); @@ -175,7 +175,7 @@ public ResourceActionGroupRead getById(UUID resourceId, UUID groupId) throws IOE * @return The {@link ResourceActionGroupRead} object representing the created action group. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionGroupRead create(String resourceKey, ResourceActionGroupCreate groupData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -198,7 +198,7 @@ public ResourceActionGroupRead create(String resourceKey, ResourceActionGroupCre * @param groupKey The group key. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String resourceKey, String groupKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/ResourceActionsApi.java b/src/main/java/io/permit/sdk/api/ResourceActionsApi.java index 600147e..95f2c53 100644 --- a/src/main/java/io/permit/sdk/api/ResourceActionsApi.java +++ b/src/main/java/io/permit/sdk/api/ResourceActionsApi.java @@ -67,7 +67,7 @@ private String getResourceActionsUrl(String resourceKey, String url) { * @return An array of {@link ResourceActionRead} objects representing the resource actions. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead[] list(String resourceKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -98,7 +98,7 @@ public ResourceActionRead[] list(String resourceKey, int page, int perPage) thro * @return An array of {@link ResourceActionRead} objects representing the resource actions. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead[] list(String resourceKey, int page) throws IOException, PermitApiError, PermitContextError { return this.list(resourceKey, page, 100); @@ -111,7 +111,7 @@ public ResourceActionRead[] list(String resourceKey, int page) throws IOExceptio * @return An array of {@link ResourceActionRead} objects representing the resource actions. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead[] list(String resourceKey) throws IOException, PermitApiError, PermitContextError { return this.list(resourceKey,1); @@ -125,7 +125,7 @@ public ResourceActionRead[] list(String resourceKey) throws IOException, PermitA * @return The {@link ResourceActionRead} object representing the resource action. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead get(String resourceKey, String actionKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -148,7 +148,7 @@ public ResourceActionRead get(String resourceKey, String actionKey) throws IOExc * @return The {@link ResourceActionRead} object representing the resource action. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead getByKey(String resourceKey, String actionKey) throws IOException, PermitApiError, PermitContextError { return this.get(resourceKey, actionKey); @@ -162,7 +162,7 @@ public ResourceActionRead getByKey(String resourceKey, String actionKey) throws * @return The {@link ResourceActionRead} object representing the resource action. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead getById(UUID resourceId, UUID actionId) throws IOException, PermitApiError, PermitContextError { return this.get(resourceId.toString(), actionId.toString()); @@ -176,7 +176,7 @@ public ResourceActionRead getById(UUID resourceId, UUID actionId) throws IOExcep * @return The {@link ResourceActionRead} object representing the created resource action. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead create(String resourceKey, ResourceActionCreate actionData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -201,7 +201,7 @@ public ResourceActionRead create(String resourceKey, ResourceActionCreate action * @return The {@link ResourceActionRead} object representing the updated resource action. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceActionRead update(String resourceKey, String actionKey, ResourceActionUpdate actionData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -224,7 +224,7 @@ public ResourceActionRead update(String resourceKey, String actionKey, ResourceA * @param actionKey The key of the action to delete. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String resourceKey, String actionKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/ResourceAttributesApi.java b/src/main/java/io/permit/sdk/api/ResourceAttributesApi.java index d661bfa..4e67634 100644 --- a/src/main/java/io/permit/sdk/api/ResourceAttributesApi.java +++ b/src/main/java/io/permit/sdk/api/ResourceAttributesApi.java @@ -71,7 +71,7 @@ private String getResourceAttributesUrl(String resourceKey, String url) { * @return An array of {@link ResourceAttributeRead} objects representing the resource attributes. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead[] list(String resourceKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -102,7 +102,7 @@ public ResourceAttributeRead[] list(String resourceKey, int page, int perPage) t * @return An array of {@link ResourceAttributeRead} objects representing the resource attributes. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead[] list(String resourceKey, int page) throws IOException, PermitApiError, PermitContextError { return this.list(resourceKey, page, 100); @@ -115,7 +115,7 @@ public ResourceAttributeRead[] list(String resourceKey, int page) throws IOExcep * @return An array of {@link ResourceAttributeRead} objects representing the resource attributes. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead[] list(String resourceKey) throws IOException, PermitApiError, PermitContextError { return this.list(resourceKey,1); @@ -129,7 +129,7 @@ public ResourceAttributeRead[] list(String resourceKey) throws IOException, Perm * @return The {@link ResourceAttributeRead} object representing the resource attribute. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead get(String resourceKey, String attributeKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -152,7 +152,7 @@ public ResourceAttributeRead get(String resourceKey, String attributeKey) throws * @return The {@link ResourceAttributeRead} object representing the resource attribute. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead getByKey(String resourceKey, String attributeKey) throws IOException, PermitApiError, PermitContextError { return this.get(resourceKey, attributeKey); @@ -166,7 +166,7 @@ public ResourceAttributeRead getByKey(String resourceKey, String attributeKey) t * @return The {@link ResourceAttributeRead} object representing the resource attribute. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead getById(UUID resourceId, UUID attributeId) throws IOException, PermitApiError, PermitContextError { return this.get(resourceId.toString(), attributeId.toString()); @@ -181,7 +181,7 @@ public ResourceAttributeRead getById(UUID resourceId, UUID attributeId) throws I * @return The {@link ResourceAttributeRead} object representing the created resource attribute. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead create(String resourceKey, ResourceAttributeCreate attributeData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -206,7 +206,7 @@ public ResourceAttributeRead create(String resourceKey, ResourceAttributeCreate * @return The {@link ResourceAttributeRead} object representing the updated resource attribute. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceAttributeRead update(String resourceKey, String attributeKey, ResourceAttributeUpdate attributeData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -229,7 +229,7 @@ public ResourceAttributeRead update(String resourceKey, String attributeKey, Res * @param attributeKey The key of the attribute to delete. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String resourceKey, String attributeKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/ResourcesApi.java b/src/main/java/io/permit/sdk/api/ResourcesApi.java index d4b1555..0152193 100644 --- a/src/main/java/io/permit/sdk/api/ResourcesApi.java +++ b/src/main/java/io/permit/sdk/api/ResourcesApi.java @@ -65,7 +65,7 @@ private String getResourcesUrl(String url) { * @return An array of {@link ResourceRead} objects representing the resources. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead[] list(int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -95,7 +95,7 @@ public ResourceRead[] list(int page, int perPage) throws IOException, PermitApiE * @return An array of {@link ResourceRead} objects representing the resources. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead[] list(int page) throws IOException, PermitApiError, PermitContextError { return this.list(page, 100); @@ -107,7 +107,7 @@ public ResourceRead[] list(int page) throws IOException, PermitApiError, PermitC * @return An array of {@link ResourceRead} objects representing the resources. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead[] list() throws IOException, PermitApiError, PermitContextError { return this.list(1); @@ -120,7 +120,7 @@ public ResourceRead[] list() throws IOException, PermitApiError, PermitContextEr * @return The {@link ResourceRead} object representing the resource. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead get(String resourceKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -142,7 +142,7 @@ public ResourceRead get(String resourceKey) throws IOException, PermitApiError, * @return The {@link ResourceRead} object representing the resource. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead getByKey(String resourceKey) throws IOException, PermitApiError, PermitContextError { return this.get(resourceKey); @@ -155,7 +155,7 @@ public ResourceRead getByKey(String resourceKey) throws IOException, PermitApiEr * @return The {@link ResourceRead} object representing the resource. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead getById(UUID resourceId) throws IOException, PermitApiError, PermitContextError { return this.get(resourceId.toString()); @@ -168,7 +168,7 @@ public ResourceRead getById(UUID resourceId) throws IOException, PermitApiError, * @return The {@link ResourceRead} object representing the created resource. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead create(ResourceCreate resourceData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -192,7 +192,7 @@ public ResourceRead create(ResourceCreate resourceData) throws IOException, Perm * @return The {@link ResourceRead} object representing the replaced resource. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError * If there is an error in the Permit context. + * @throws PermitContextError * If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead replace(String resourceKey, ResourceReplace resourceData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -216,7 +216,7 @@ public ResourceRead replace(String resourceKey, ResourceReplace resourceData) th * @return The {@link ResourceRead} object representing the updated resource. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public ResourceRead update(String resourceKey, ResourceUpdate resourceData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -238,7 +238,7 @@ public ResourceRead update(String resourceKey, ResourceUpdate resourceData) thro * @param resourceKey The key of the resource to delete. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String resourceKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/RoleAssignmentsApi.java b/src/main/java/io/permit/sdk/api/RoleAssignmentsApi.java index 04e019f..22825f6 100644 --- a/src/main/java/io/permit/sdk/api/RoleAssignmentsApi.java +++ b/src/main/java/io/permit/sdk/api/RoleAssignmentsApi.java @@ -63,7 +63,7 @@ private String getRoleAssignmentsUrl(String url) { * @return An array of RoleAssignmentRead objects representing the role assignments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead[] list(String userKey, String tenantKey, String roleKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -105,7 +105,7 @@ public RoleAssignmentRead[] list(String userKey, String tenantKey, String roleKe * @return An array of RoleAssignmentRead objects representing the role assignments. * @throws IOException If an I/Oerror occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead[] list(String userKey, String tenantKey, String roleKey, int page) throws IOException, PermitApiError, PermitContextError { return this.list(userKey, tenantKey, roleKey, page, 100); @@ -120,7 +120,7 @@ public RoleAssignmentRead[] list(String userKey, String tenantKey, String roleKe * @return An array of RoleAssignmentRead objects representing the role assignments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead[] list(String userKey, String tenantKey, String roleKey) throws IOException, PermitApiError, PermitContextError { return this.list(userKey, tenantKey, roleKey, 1); @@ -136,7 +136,7 @@ public RoleAssignmentRead[] list(String userKey, String tenantKey, String roleKe * @return The RoleAssignmentRead object representing the assigned role. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead assign(RoleAssignmentCreate assignment) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -161,7 +161,7 @@ public RoleAssignmentRead assign(RoleAssignmentCreate assignment) throws IOExcep * @param unassignment The RoleAssignmentRemove object containing the unassignment data. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void unassign(RoleAssignmentRemove unassignment) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -187,7 +187,7 @@ public void unassign(RoleAssignmentRemove unassignment) throws IOException, Perm * @return The BulkRoleAssignmentReport object representing the report of bulk role assignments. * @throws IOException If an I/O error occurs during the HTTP request * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public BulkRoleAssignmentReport bulkAssign(List assignments) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -211,7 +211,7 @@ public BulkRoleAssignmentReport bulkAssign(List assignment * @return The BulkRoleUnassignmentReport object representing the report of bulk role unassignments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public BulkRoleUnassignmentReport bulkUnassign(List unassignments) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/RolesApi.java b/src/main/java/io/permit/sdk/api/RolesApi.java index 7029154..0b81e68 100644 --- a/src/main/java/io/permit/sdk/api/RolesApi.java +++ b/src/main/java/io/permit/sdk/api/RolesApi.java @@ -65,7 +65,7 @@ private String getRolesUrl(String url) { * @return An array of RoleRead objects representing the roles. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured SDK context {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead[] list(int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -95,7 +95,7 @@ public RoleRead[] list(int page, int perPage) throws IOException, PermitApiError * @return An array of RoleRead objects representing the roles. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead[] list(int page) throws IOException, PermitApiError, PermitContextError { return this.list(page, 100); @@ -107,7 +107,7 @@ public RoleRead[] list(int page) throws IOException, PermitApiError, PermitConte * @return An array of RoleRead objects representing the roles. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead[] list() throws IOException, PermitApiError, PermitContextError { return this.list(1); @@ -120,7 +120,7 @@ public RoleRead[] list() throws IOException, PermitApiError, PermitContextError * @return The RoleRead object representing the role. * @throws IOException If an I/O error occurs during * the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead get(String roleKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -142,7 +142,7 @@ public RoleRead get(String roleKey) throws IOException, PermitApiError, PermitCo * @return The RoleRead object representing the role. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead getByKey(String roleKey) throws IOException, PermitApiError, PermitContextError { return this.get(roleKey); @@ -155,7 +155,7 @@ public RoleRead getByKey(String roleKey) throws IOException, PermitApiError, Per * @return The RoleRead object representing the role. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead getById(UUID roleId) throws IOException, PermitApiError, PermitContextError { return this.get(roleId.toString()); @@ -168,7 +168,7 @@ public RoleRead getById(UUID roleId) throws IOException, PermitApiError, PermitC * @return The RoleRead object representing the created role. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead create(RoleCreate roleData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -192,7 +192,7 @@ public RoleRead create(RoleCreate roleData) throws IOException, PermitApiError, * @return The RoleRead object representing the updated role. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead update(String roleKey, RoleUpdate roleData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -214,7 +214,7 @@ public RoleRead update(String roleKey, RoleUpdate roleData) throws IOException, * @param roleKey The key of the role to delete. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String roleKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -238,7 +238,7 @@ public void delete(String roleKey) throws IOException, PermitApiError, PermitCon * @return The RoleRead object representing the role after the permissions are assigned. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead assignPermissions(String roleKey, ArrayList permissions) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -262,7 +262,7 @@ public RoleRead assignPermissions(String roleKey, ArrayList permissions) * @return The RoleRead object representing the role after the permissions are removed. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleRead removePermissions(String roleKey, ArrayList permissions) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/TenantsApi.java b/src/main/java/io/permit/sdk/api/TenantsApi.java index 97f9b48..22de999 100644 --- a/src/main/java/io/permit/sdk/api/TenantsApi.java +++ b/src/main/java/io/permit/sdk/api/TenantsApi.java @@ -66,7 +66,7 @@ private String getTenantsUrl(String url) { * @return An array of TenantRead objects representing the retrieved tenants. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead[] list(int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -96,7 +96,7 @@ public TenantRead[] list(int page, int perPage) throws IOException, PermitApiErr * @return An array of TenantRead objects representing the retrieved tenants. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead[] list(int page) throws IOException, PermitApiError, PermitContextError { return this.list(page, 100); @@ -108,7 +108,7 @@ public TenantRead[] list(int page) throws IOException, PermitApiError, PermitCon * @return An array of TenantRead objects representing the retrieved tenants. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead[] list() throws IOException, PermitApiError, PermitContextError { return this.list(1); @@ -123,7 +123,7 @@ public TenantRead[] list() throws IOException, PermitApiError, PermitContextErro * @return A PaginatedResultUserRead object representing the retrieved paginated result of users. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public PaginatedResultUserRead listTenantUsers(String tenantKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -151,7 +151,7 @@ public PaginatedResultUserRead listTenantUsers(String tenantKey, int page, int p * @return A PaginatedResultUserRead object representing the retrieved paginated result of users. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public PaginatedResultUserRead listTenantUsers(String tenantKey, int page) throws IOException, PermitApiError, PermitContextError { return this.listTenantUsers(tenantKey, page, 100); @@ -164,7 +164,7 @@ public PaginatedResultUserRead listTenantUsers(String tenantKey, int page) throw * @return A PaginatedResultUserRead object representing the retrieved paginated result of users. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public PaginatedResultUserRead listTenantUsers(String tenantKey) throws IOException, PermitApiError, PermitContextError { return this.listTenantUsers(tenantKey, 1); @@ -177,7 +177,7 @@ public PaginatedResultUserRead listTenantUsers(String tenantKey) throws IOExcept * @return A TenantRead object representing the retrieved tenant. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead get(String tenantKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -198,7 +198,7 @@ public TenantRead get(String tenantKey) throws IOException, PermitApiError, Perm * @return A TenantRead object representing the retrieved tenant. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead getByKey(String tenantKey) throws IOException, PermitApiError, PermitContextError { return this.get(tenantKey); @@ -211,7 +211,7 @@ public TenantRead getByKey(String tenantKey) throws IOException, PermitApiError, * @return A TenantRead object representing the retrieved tenant. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead getById(UUID tenantId) throws IOException, PermitApiError, PermitContextError { return this.get(tenantId.toString()); @@ -224,7 +224,7 @@ public TenantRead getById(UUID tenantId) throws IOException, PermitApiError, Per * @return A TenantRead object representing the created tenant. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead create(TenantCreate tenantData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -248,7 +248,7 @@ public TenantRead create(TenantCreate tenantData) throws IOException, PermitApiE * @return A TenantRead object representing the updated tenant. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public TenantRead update(String tenantKey, TenantUpdate tenantData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -270,7 +270,7 @@ public TenantRead update(String tenantKey, TenantUpdate tenantData) throws IOExc * @param tenantKey The key of the tenant to be deleted. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String tenantKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); diff --git a/src/main/java/io/permit/sdk/api/UsersApi.java b/src/main/java/io/permit/sdk/api/UsersApi.java index 4d975c8..2a423f0 100644 --- a/src/main/java/io/permit/sdk/api/UsersApi.java +++ b/src/main/java/io/permit/sdk/api/UsersApi.java @@ -73,7 +73,7 @@ private String getUsersUrl(String url) { * @return A PaginatedResultUserRead object representing the retrieved paginated result of users. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public PaginatedResultUserRead list(int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -103,7 +103,7 @@ public PaginatedResultUserRead list(int page, int perPage) throws IOException, P * @return A PaginatedResultUserRead object representing the retrieved paginated result of users. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public PaginatedResultUserRead list(int page) throws IOException, PermitApiError, PermitContextError { return this.list(page, 100); @@ -115,7 +115,7 @@ public PaginatedResultUserRead list(int page) throws IOException, PermitApiError * @return A PaginatedResultUserRead object representing the retrieved paginated result of users. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public PaginatedResultUserRead list() throws IOException, PermitApiError, PermitContextError { return this.list(1); @@ -128,7 +128,7 @@ public PaginatedResultUserRead list() throws IOException, PermitApiError, Permit * @return A UserRead object representing the retrieved user. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public UserRead get(String userKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -149,7 +149,7 @@ public UserRead get(String userKey) throws IOException, PermitApiError, PermitCo * @return A UserRead object representing the retrieved user. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public UserRead getByKey(String userKey) throws IOException, PermitApiError, PermitContextError { return this.get(userKey); @@ -162,7 +162,7 @@ public UserRead getByKey(String userKey) throws IOException, PermitApiError, Per * @return A UserRead object representing the retrieved user. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public UserRead getById(UUID userId) throws IOException, PermitApiError, PermitContextError { return this.get(userId.toString()); @@ -175,7 +175,7 @@ public UserRead getById(UUID userId) throws IOException, PermitApiError, PermitC * @return A UserRead object representing the created user. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public UserRead create(UserCreate userData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -199,7 +199,7 @@ public UserRead create(UserCreate userData) throws IOException, PermitApiError, * @return A UserRead object representing the updated user. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public UserRead update(String userKey, UserUpdate userData) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -222,7 +222,7 @@ public UserRead update(String userKey, UserUpdate userData) throws IOException, * @return A CreateOrUpdateResult object representing the result of the synchronization. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public CreateOrUpdateResult sync(UserCreate userData) throws IOException, PermitApiError, PermitContextError { if (userData.key == null) { @@ -259,7 +259,7 @@ public CreateOrUpdateResult sync(UserCreate userData) throws IOExcepti * @return A CreateOrUpdateResult object representing the result of the synchronization. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public CreateOrUpdateResult sync(User user) throws IOException, PermitApiError, PermitContextError { UserCreate userData = new UserCreate(user.getKey()); @@ -285,7 +285,7 @@ public CreateOrUpdateResult sync(User user) throws IOException, Permit * @param userKey The key of the user to be deleted. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void delete(String userKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -310,7 +310,7 @@ public void delete(String userKey) throws IOException, PermitApiError, PermitCon * @return A RoleAssignmentRead object representing the assigned role. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead assignRole(String userKey, String roleKey, String tenantKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -334,7 +334,7 @@ public RoleAssignmentRead assignRole(String userKey, String roleKey, String tena * @param tenantKey The key of the tenant. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public void unassignRole(String userKey, String roleKey, String tenantKey) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -362,7 +362,7 @@ public void unassignRole(String userKey, String roleKey, String tenantKey) throw * @return An array of RoleAssignmentRead objects representing the retrieved role assignments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead[] getAssignedRoles(@NotNull String userKey, String tenantKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY); @@ -406,7 +406,7 @@ public RoleAssignmentRead[] getAssignedRoles(@NotNull String userKey, String ten * @return An array of RoleAssignmentRead objects representing the retrieved role assignments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead[] getAssignedRoles(@NotNull String userKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError { return this.getAssignedRoles(userKey, null, page, perPage); @@ -420,7 +420,7 @@ public RoleAssignmentRead[] getAssignedRoles(@NotNull String userKey, int page, * @return An array of RoleAssignmentRead objects representing the retrieved role assignments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead[] getAssignedRoles(@NotNull String userKey, int page) throws IOException, PermitApiError, PermitContextError { return this.getAssignedRoles(userKey, page, 100); @@ -433,7 +433,7 @@ public RoleAssignmentRead[] getAssignedRoles(@NotNull String userKey, int page) * @return An array of RoleAssignmentRead objects representing the retrieved role assignments. * @throws IOException If an I/O error occurs during the HTTP request. * @throws PermitApiError If the Permit API returns a response with an error status code. - * @throws PermitContextError If there is an error in the Permit context. + * @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context. */ public RoleAssignmentRead[] getAssignedRoles(@NotNull String userKey) throws IOException, PermitApiError, PermitContextError { return this.getAssignedRoles(userKey, 1);