diff --git a/.fern/replay.lock b/.fern/replay.lock
index 2afb23da0..67af0e9fc 100644
--- a/.fern/replay.lock
+++ b/.fern/replay.lock
@@ -36,5 +36,11 @@ generations:
cli_version: unknown
generator_versions:
fernapi/fern-java-sdk: 4.11.1
-current_generation: 91cdb7769f3d5d9facbd490ac199b4e030630b00
+ - commit_sha: 6981a2ead10a6b0f4d15c2b21942acdb6de4a930
+ tree_hash: 9051bc49b73ae30d9d0d3bcd3655848a16e60442
+ timestamp: 2026-09-02T09:23:31.722Z
+ cli_version: unknown
+ generator_versions:
+ fernapi/fern-java-sdk: 4.11.1
+current_generation: 6981a2ead10a6b0f4d15c2b21942acdb6de4a930
patches: []
diff --git a/build.gradle b/build.gradle
index 523686caf..cbfbfb8db 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,9 +22,9 @@ logger.lifecycle("Using version ${version} for ${name} group $group")
dependencies {
// Core dependencies
api 'com.squareup.okhttp3:okhttp:5.2.1'
- api 'com.fasterxml.jackson.core:jackson-databind:2.21.5'
- api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.21.5'
- api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.5'
+ api 'com.fasterxml.jackson.core:jackson-databind:2.21.6'
+ api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.21.6'
+ api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.6'
// Dependencies for legacy management code from auth0-real
implementation 'com.squareup.okhttp3:logging-interceptor:5.2.1'
diff --git a/reference.md b/reference.md
index 9d82c8d1d..739d6695c 100644
--- a/reference.md
+++ b/reference.md
@@ -2162,6 +2162,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
-
+**b2BIntegrationConfiguration:** `Optional`
+
+
+
+
+
+-
+
**myOrganizationConfiguration:** `Optional`
@@ -2951,6 +2959,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
-
+**b2BIntegrationConfiguration:** `Optional`
+
+
+
+
+
+-
+
**myOrganizationConfiguration:** `Optional`
@@ -3209,6 +3225,14 @@ client.connectionProfiles().create(
-
+**provisioning:** `Optional`
+
+
+
+
+
+-
+
**crossAppAccessResourceApp:** `Optional`
@@ -3525,6 +3549,14 @@ client.connectionProfiles().update(
-
+**provisioning:** `Optional`
+
+
+
+
+
+-
+
**crossAppAccessResourceApp:** `Optional`
@@ -8953,7 +8985,542 @@ client.networkAcls().delete("id");
-
-Update existing access control list for your client.
+Update existing access control list for your client.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.networkAcls().update(
+ "id",
+ UpdateNetworkAclRequestContent
+ .builder()
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `String` — The id of the ACL to update.
+
+
+
+
+
+-
+
+**description:** `Optional`
+
+
+
+
+
+-
+
+**active:** `Optional` — Indicates whether or not this access control list is actively being used
+
+
+
+
+
+-
+
+**priority:** `Optional` — Indicates the order in which the ACL will be evaluated relative to other ACL rules.
+
+
+
+
+
+-
+
+**rule:** `Optional`
+
+
+
+
+
+
+
+
+
+
+
+## OrganizationTemplates
+client.organizationTemplates.list() -> SyncPagingIterable<OrganizationTemplate>
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (`id`) in ascending order.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.organizationTemplates().list(
+ ListOrganizationTemplatesRequestParameters
+ .builder()
+ .from("from")
+ .take(1)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**from:** `Optional` — Optional Id from which to start selection.
+
+
+
+
+
+-
+
+**take:** `Optional` — Number of results per page. Defaults to 5. Values greater than 10 are capped at 10.
+
+
+
+
+
+
+
+
+
+
+
+client.organizationTemplates.create(request) -> OrganizationTemplate
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create an Organization Template.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.organizationTemplates().create(
+ CreateOrganizationTemplateRequestContent
+ .builder()
+ .name("name")
+ .organizationDeletionBehavior(OrganizationDeletionBehaviorEnum.ALLOW)
+ .enforcePermissionCeiling(true)
+ .enforceSelfAssignmentRestriction(true)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**name:** `String` — The name of the organization template.
+
+
+
+
+
+-
+
+**isDefault:** `Optional` — Whether this is the default template applied to new organizations.
+
+
+
+
+
+-
+
+**organizationDeletionBehavior:** `OrganizationDeletionBehaviorEnum`
+
+
+
+
+
+-
+
+**connectionDeletionBehavior:** `Optional`
+
+
+
+
+
+-
+
+**enforcePermissionCeiling:** `Boolean` — Whether to enforce permission ceiling for organizations using this template.
+
+
+
+
+
+-
+
+**enforceSelfAssignmentRestriction:** `Boolean` — Whether to enforce self-assignment restrictions for organizations using this template.
+
+
+
+
+
+-
+
+**connectionProfileId:** `Optional` — The connection profile to apply to new connections.
+
+
+
+
+
+-
+
+**userAttributeProfileId:** `Optional` — The user attribute profile to apply to organizations.
+
+
+
+
+
+-
+
+**allowedStrategies:** `Optional
>` — List of allowed connection strategies for this template.
+
+
+
+
+
+-
+
+**invitationLandingClientId:** `Optional` — The client ID for the invitation landing page.
+
+
+
+
+
+-
+
+**adminRolesAssignment:** `Optional
>` — Default admin roles to assign to organization creators.
+
+
+
+
+
+-
+
+**useForOrganizationDiscovery:** `Optional`
+
+
+
+
+
+-
+
+**roleVisibilityPolicy:** `Optional`
+
+
+
+
+
+
+
+
+
+
+
+client.organizationTemplates.get(id) -> OrganizationTemplate
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve details about a single Organization Template specified by ID.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.organizationTemplates().get("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `String` — Organization Template identifier.
+
+
+
+
+
+
+
+
+
+
+
+client.organizationTemplates.update(id, request) -> OrganizationTemplate
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update the details of a specific Organization Template.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.organizationTemplates().update(
+ "id",
+ UpdateOrganizationTemplateRequestContent
+ .builder()
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `String` — Organization Template identifier.
+
+
+
+
+
+-
+
+**name:** `Optional` — The name of the organization template.
+
+
+
+
+
+-
+
+**isDefault:** `Optional` — Whether this is the default template applied to new organizations.
+
+
+
+
+
+-
+
+**organizationDeletionBehavior:** `Optional`
+
+
+
+
+
+-
+
+**connectionDeletionBehavior:** `Optional`
+
+
+
+
+
+-
+
+**enforcePermissionCeiling:** `Optional` — Whether to enforce permission ceiling for organizations using this template.
+
+
+
+
+
+-
+
+**enforceSelfAssignmentRestriction:** `Optional` — Whether to enforce self-assignment restrictions for organizations using this template.
+
+
+
+
+
+-
+
+**connectionProfileId:** `Optional` — The connection profile to apply to new connections.
+
+
+
+
+
+-
+
+**userAttributeProfileId:** `Optional` — The user attribute profile to apply to organizations.
+
+
+
+
+
+-
+
+**allowedStrategies:** `Optional
>` — List of allowed connection strategies for this template.
+
+
+
+
+
+-
+
+**invitationLandingClientId:** `Optional` — The client ID for the invitation landing page.
+
+
+
+
+
+-
+
+**adminRolesAssignment:** `Optional
>` — Default admin roles to assign to organization creators.
+
+
+
+
+
+-
+
+**useForOrganizationDiscovery:** `Optional`
+
+
+
+
+
+-
+
+**roleVisibilityPolicy:** `Optional`
+
+
+
+
+
+
+
+
+
+
+
+client.organizationTemplates.listOrganizations(id) -> SyncPagingIterable<OrganizationTemplateAssignedOrganization>
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (`id`) in ascending order.
@@ -8968,10 +9535,12 @@ Update existing access control list for your client.
-
```java
-client.networkAcls().update(
+client.organizationTemplates().listOrganizations(
"id",
- UpdateNetworkAclRequestContent
+ ListTemplateOrganizationsRequestParameters
.builder()
+ .from("from")
+ .take(1)
.build()
);
```
@@ -8988,23 +9557,7 @@ client.networkAcls().update(
-
-**id:** `String` — The id of the ACL to update.
-
-
-
-
-
--
-
-**description:** `Optional`
-
-
-
-
-
--
-
-**active:** `Optional` — Indicates whether or not this access control list is actively being used
+**id:** `String` — The ID of the organization template.
@@ -9012,7 +9565,7 @@ client.networkAcls().update(
-
-**priority:** `Optional` — Indicates the order in which the ACL will be evaluated relative to other ACL rules.
+**from:** `Optional` — Optional Id from which to start selection.
@@ -9020,7 +9573,7 @@ client.networkAcls().update(
-
-**rule:** `Optional`
+**take:** `Optional` — Number of results per page. Defaults to 5. Values greater than 10 are capped at 10.
@@ -25563,6 +26116,60 @@ client.keys().networkAcls().get("id");
+
+
+
+
+client.keys.networkAcls.delete(id)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a key used to verify HTTP Message Signatures on Network ACL rules
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.keys().networkAcls().delete("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `String` — ID of the Network ACL Key to delete.
+
+
+
+
+
+
+
@@ -28163,6 +28770,185 @@ client.organizations().members().delete(
+
+
+
+
+## Organizations OrganizationTemplate
+client.organizations.organizationTemplate.get(id) -> OrganizationTemplate
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.organizations().organizationTemplate().get("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `String` — ID of the organization.
+
+
+
+
+
+
+
+
+
+
+
+client.organizations.organizationTemplate.assignOrganizationTemplate(id, templateId)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Assign an Organization Template to an organization.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.organizations().organizationTemplate().assignOrganizationTemplate("id", "template_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `String` — The ID of the organization.
+
+
+
+
+
+-
+
+**templateId:** `String` — The ID of the organization template to assign.
+
+
+
+
+
+
+
+
+
+
+
+client.organizations.organizationTemplate.unassignOrganizationTemplate(id, templateId)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Remove an Organization Template assignment from an organization.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.organizations().organizationTemplate().unassignOrganizationTemplate("id", "template_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `String` — The ID of the organization.
+
+
+
+
+
+-
+
+**templateId:** `String` — The ID of the organization template to unassign.
+
+
+
+
+
+
+
@@ -32897,6 +33683,22 @@ client.users().multifactor().deleteProvider("id", UserMultifactorProviderEnum.DU
Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review [Auth0 Organizations](https://auth0.com/docs/manage-users/organizations).
+
+This endpoint supports two types of pagination:
+
+- Offset pagination
+- Checkpoint pagination
+
+Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.
+
+**Checkpoint Pagination**
+
+To search by checkpoint, use the following parameters:
+
+- `from`: Optional id from which to start selection.
+- `take`: The total number of entries to retrieve when using the `from` parameter. Defaults to 50.
+
+**Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining.
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java b/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java
index 4604539c6..e9dcb745e 100644
--- a/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java
+++ b/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java
@@ -60,6 +60,8 @@ public class AsyncManagementApi {
protected final Supplier networkAclsClient;
+ protected final Supplier organizationTemplatesClient;
+
protected final Supplier organizationsClient;
protected final Supplier promptsClient;
@@ -133,6 +135,7 @@ public AsyncManagementApi(ClientOptions clientOptions) {
this.logStreamsClient = Suppliers.memoize(() -> new AsyncLogStreamsClient(clientOptions));
this.logsClient = Suppliers.memoize(() -> new AsyncLogsClient(clientOptions));
this.networkAclsClient = Suppliers.memoize(() -> new AsyncNetworkAclsClient(clientOptions));
+ this.organizationTemplatesClient = Suppliers.memoize(() -> new AsyncOrganizationTemplatesClient(clientOptions));
this.organizationsClient = Suppliers.memoize(() -> new AsyncOrganizationsClient(clientOptions));
this.promptsClient = Suppliers.memoize(() -> new AsyncPromptsClient(clientOptions));
this.rateLimitPoliciesClient = Suppliers.memoize(() -> new AsyncRateLimitPoliciesClient(clientOptions));
@@ -244,6 +247,10 @@ public AsyncNetworkAclsClient networkAcls() {
return this.networkAclsClient.get();
}
+ public AsyncOrganizationTemplatesClient organizationTemplates() {
+ return this.organizationTemplatesClient.get();
+ }
+
public AsyncOrganizationsClient organizations() {
return this.organizationsClient.get();
}
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationTemplatesClient.java
new file mode 100644
index 000000000..0b8d5f233
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationTemplatesClient.java
@@ -0,0 +1,153 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.core.SyncPagingIterable;
+import com.auth0.client.mgmt.types.CreateOrganizationTemplateRequestContent;
+import com.auth0.client.mgmt.types.ListOrganizationTemplatesRequestParameters;
+import com.auth0.client.mgmt.types.ListTemplateOrganizationsRequestParameters;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+import com.auth0.client.mgmt.types.OrganizationTemplateAssignedOrganization;
+import com.auth0.client.mgmt.types.UpdateOrganizationTemplateRequestContent;
+import java.util.concurrent.CompletableFuture;
+
+public class AsyncOrganizationTemplatesClient {
+ protected final ClientOptions clientOptions;
+
+ private final AsyncRawOrganizationTemplatesClient rawClient;
+
+ public AsyncOrganizationTemplatesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ this.rawClient = new AsyncRawOrganizationTemplatesClient(clientOptions);
+ }
+
+ /**
+ * Get responses with HTTP metadata like headers
+ */
+ public AsyncRawOrganizationTemplatesClient withRawResponse() {
+ return this.rawClient;
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> list() {
+ return this.rawClient.list().thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> list(RequestOptions requestOptions) {
+ return this.rawClient.list(requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> list(
+ ListOrganizationTemplatesRequestParameters request) {
+ return this.rawClient.list(request).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> list(
+ ListOrganizationTemplatesRequestParameters request, RequestOptions requestOptions) {
+ return this.rawClient.list(request, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public CompletableFuture create(CreateOrganizationTemplateRequestContent request) {
+ return this.rawClient.create(request).thenApply(response -> response.body());
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public CompletableFuture create(
+ CreateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ return this.rawClient.create(request, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public CompletableFuture get(String id) {
+ return this.rawClient.get(id).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public CompletableFuture get(String id, RequestOptions requestOptions) {
+ return this.rawClient.get(id, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture update(String id) {
+ return this.rawClient.update(id).thenApply(response -> response.body());
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture update(String id, RequestOptions requestOptions) {
+ return this.rawClient.update(id, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture update(String id, UpdateOrganizationTemplateRequestContent request) {
+ return this.rawClient.update(id, request).thenApply(response -> response.body());
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture update(
+ String id, UpdateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> listOrganizations(
+ String id) {
+ return this.rawClient.listOrganizations(id).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> listOrganizations(
+ String id, RequestOptions requestOptions) {
+ return this.rawClient.listOrganizations(id, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> listOrganizations(
+ String id, ListTemplateOrganizationsRequestParameters request) {
+ return this.rawClient.listOrganizations(id, request).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture> listOrganizations(
+ String id, ListTemplateOrganizationsRequestParameters request, RequestOptions requestOptions) {
+ return this.rawClient.listOrganizations(id, request, requestOptions).thenApply(response -> response.body());
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java
index b36fa9238..20c3d698a 100644
--- a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java
@@ -15,6 +15,7 @@
import com.auth0.client.mgmt.organizations.AsyncGroupsClient;
import com.auth0.client.mgmt.organizations.AsyncInvitationsClient;
import com.auth0.client.mgmt.organizations.AsyncMembersClient;
+import com.auth0.client.mgmt.organizations.AsyncOrganizationTemplateClient;
import com.auth0.client.mgmt.organizations.roles.AsyncRolesClient;
import com.auth0.client.mgmt.types.CreateOrganizationRequestContent;
import com.auth0.client.mgmt.types.CreateOrganizationResponseContent;
@@ -46,6 +47,8 @@ public class AsyncOrganizationsClient {
protected final Supplier membersClient;
+ protected final Supplier organizationTemplateClient;
+
protected final Supplier groupsClient;
protected final Supplier rolesClient;
@@ -60,6 +63,7 @@ public AsyncOrganizationsClient(ClientOptions clientOptions) {
this.enabledConnectionsClient = Suppliers.memoize(() -> new AsyncEnabledConnectionsClient(clientOptions));
this.invitationsClient = Suppliers.memoize(() -> new AsyncInvitationsClient(clientOptions));
this.membersClient = Suppliers.memoize(() -> new AsyncMembersClient(clientOptions));
+ this.organizationTemplateClient = Suppliers.memoize(() -> new AsyncOrganizationTemplateClient(clientOptions));
this.groupsClient = Suppliers.memoize(() -> new AsyncGroupsClient(clientOptions));
this.rolesClient = Suppliers.memoize(() -> new AsyncRolesClient(clientOptions));
}
@@ -270,6 +274,10 @@ public AsyncMembersClient members() {
return this.membersClient.get();
}
+ public AsyncOrganizationTemplateClient organizationTemplate() {
+ return this.organizationTemplateClient.get();
+ }
+
public AsyncGroupsClient groups() {
return this.groupsClient.get();
}
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java
index c8fb3f587..acc5d1406 100644
--- a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java
@@ -19,6 +19,7 @@
import com.auth0.client.mgmt.errors.NotFoundError;
import com.auth0.client.mgmt.errors.TooManyRequestsError;
import com.auth0.client.mgmt.errors.UnauthorizedError;
+import com.auth0.client.mgmt.errors.UnprocessableEntityError;
import com.auth0.client.mgmt.types.ConnectionForList;
import com.auth0.client.mgmt.types.CreateConnectionRequestContent;
import com.auth0.client.mgmt.types.CreateConnectionResponseContent;
@@ -347,6 +348,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
response));
return;
+ case 422:
+ future.completeExceptionally(new UnprocessableEntityError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
case 429:
future.completeExceptionally(new TooManyRequestsError(
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
@@ -710,6 +716,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
response));
return;
+ case 422:
+ future.completeExceptionally(new UnprocessableEntityError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
case 429:
future.completeExceptionally(new TooManyRequestsError(
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationTemplatesClient.java
new file mode 100644
index 000000000..770298145
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationTemplatesClient.java
@@ -0,0 +1,673 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.ManagementApiException;
+import com.auth0.client.mgmt.core.ManagementApiHttpResponse;
+import com.auth0.client.mgmt.core.ManagementException;
+import com.auth0.client.mgmt.core.MediaTypes;
+import com.auth0.client.mgmt.core.ObjectMappers;
+import com.auth0.client.mgmt.core.QueryStringMapper;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.core.RetryInterceptor;
+import com.auth0.client.mgmt.core.SyncPagingIterable;
+import com.auth0.client.mgmt.errors.BadRequestError;
+import com.auth0.client.mgmt.errors.ConflictError;
+import com.auth0.client.mgmt.errors.ForbiddenError;
+import com.auth0.client.mgmt.errors.NotFoundError;
+import com.auth0.client.mgmt.errors.TooManyRequestsError;
+import com.auth0.client.mgmt.errors.UnauthorizedError;
+import com.auth0.client.mgmt.types.CreateOrganizationTemplateRequestContent;
+import com.auth0.client.mgmt.types.ListOrganizationTemplatesPaginatedResponseContent;
+import com.auth0.client.mgmt.types.ListOrganizationTemplatesRequestParameters;
+import com.auth0.client.mgmt.types.ListTemplateOrganizationsPaginatedResponseContent;
+import com.auth0.client.mgmt.types.ListTemplateOrganizationsRequestParameters;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+import com.auth0.client.mgmt.types.OrganizationTemplateAssignedOrganization;
+import com.auth0.client.mgmt.types.UpdateOrganizationTemplateRequestContent;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+import org.jetbrains.annotations.NotNull;
+
+public class AsyncRawOrganizationTemplatesClient {
+ protected final ClientOptions clientOptions;
+
+ public AsyncRawOrganizationTemplatesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>> list() {
+ return list(ListOrganizationTemplatesRequestParameters.builder().build());
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>> list(
+ RequestOptions requestOptions) {
+ return list(ListOrganizationTemplatesRequestParameters.builder().build(), requestOptions);
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>> list(
+ ListOrganizationTemplatesRequestParameters request) {
+ return list(request, null);
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>> list(
+ ListOrganizationTemplatesRequestParameters request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates");
+ if (!request.getFrom().isAbsent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "from", request.getFrom().orElse(null), false);
+ }
+ QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(5), false);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture>> future =
+ new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ ListOrganizationTemplatesPaginatedResponseContent parsedResponse =
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, ListOrganizationTemplatesPaginatedResponseContent.class);
+ Optional startingAfter = parsedResponse.getNext();
+ ListOrganizationTemplatesRequestParameters nextRequest =
+ ListOrganizationTemplatesRequestParameters.builder()
+ .from(request)
+ .from(startingAfter)
+ .build();
+ List result =
+ parsedResponse.getOrganizationTemplates().orElse(Collections.emptyList());
+ future.complete(new ManagementApiHttpResponse<>(
+ new SyncPagingIterable(
+ startingAfter.isPresent(), result, parsedResponse, () -> {
+ try {
+ return list(nextRequest, requestOptions)
+ .get()
+ .body();
+ } catch (InterruptedException | ExecutionException e) {
+ throw new RuntimeException(e);
+ }
+ }),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public CompletableFuture> create(
+ CreateOrganizationTemplateRequestContent request) {
+ return create(request, null);
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public CompletableFuture> create(
+ CreateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 409:
+ future.completeExceptionally(new ConflictError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public CompletableFuture> get(String id) {
+ return get(id, null);
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public CompletableFuture> get(
+ String id, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates")
+ .addPathSegment(id);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture> update(String id) {
+ return update(id, UpdateOrganizationTemplateRequestContent.builder().build());
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture> update(
+ String id, RequestOptions requestOptions) {
+ return update(id, UpdateOrganizationTemplateRequestContent.builder().build(), requestOptions);
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture> update(
+ String id, UpdateOrganizationTemplateRequestContent request) {
+ return update(id, request, null);
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public CompletableFuture> update(
+ String id, UpdateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates")
+ .addPathSegment(id);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("PATCH", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>>
+ listOrganizations(String id) {
+ return listOrganizations(
+ id, ListTemplateOrganizationsRequestParameters.builder().build());
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>>
+ listOrganizations(String id, RequestOptions requestOptions) {
+ return listOrganizations(
+ id, ListTemplateOrganizationsRequestParameters.builder().build(), requestOptions);
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>>
+ listOrganizations(String id, ListTemplateOrganizationsRequestParameters request) {
+ return listOrganizations(id, request, null);
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public CompletableFuture>>
+ listOrganizations(
+ String id, ListTemplateOrganizationsRequestParameters request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates")
+ .addPathSegment(id)
+ .addPathSegments("organizations");
+ if (!request.getFrom().isAbsent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "from", request.getFrom().orElse(null), false);
+ }
+ QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(5), false);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture>>
+ future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ ListTemplateOrganizationsPaginatedResponseContent parsedResponse =
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, ListTemplateOrganizationsPaginatedResponseContent.class);
+ Optional startingAfter = parsedResponse.getNext();
+ ListTemplateOrganizationsRequestParameters nextRequest =
+ ListTemplateOrganizationsRequestParameters.builder()
+ .from(request)
+ .from(startingAfter)
+ .build();
+ List result = parsedResponse.getOrganizations();
+ future.complete(new ManagementApiHttpResponse<>(
+ new SyncPagingIterable(
+ startingAfter.isPresent(), result, parsedResponse, () -> {
+ try {
+ return listOrganizations(id, nextRequest, requestOptions)
+ .get()
+ .body();
+ } catch (InterruptedException | ExecutionException e) {
+ throw new RuntimeException(e);
+ }
+ }),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/ManagementApi.java b/src/main/java/com/auth0/client/mgmt/ManagementApi.java
index d17fb3c1e..20d44de2f 100644
--- a/src/main/java/com/auth0/client/mgmt/ManagementApi.java
+++ b/src/main/java/com/auth0/client/mgmt/ManagementApi.java
@@ -60,6 +60,8 @@ public class ManagementApi {
protected final Supplier networkAclsClient;
+ protected final Supplier organizationTemplatesClient;
+
protected final Supplier organizationsClient;
protected final Supplier promptsClient;
@@ -133,6 +135,7 @@ public ManagementApi(ClientOptions clientOptions) {
this.logStreamsClient = Suppliers.memoize(() -> new LogStreamsClient(clientOptions));
this.logsClient = Suppliers.memoize(() -> new LogsClient(clientOptions));
this.networkAclsClient = Suppliers.memoize(() -> new NetworkAclsClient(clientOptions));
+ this.organizationTemplatesClient = Suppliers.memoize(() -> new OrganizationTemplatesClient(clientOptions));
this.organizationsClient = Suppliers.memoize(() -> new OrganizationsClient(clientOptions));
this.promptsClient = Suppliers.memoize(() -> new PromptsClient(clientOptions));
this.rateLimitPoliciesClient = Suppliers.memoize(() -> new RateLimitPoliciesClient(clientOptions));
@@ -244,6 +247,10 @@ public NetworkAclsClient networkAcls() {
return this.networkAclsClient.get();
}
+ public OrganizationTemplatesClient organizationTemplates() {
+ return this.organizationTemplatesClient.get();
+ }
+
public OrganizationsClient organizations() {
return this.organizationsClient.get();
}
diff --git a/src/main/java/com/auth0/client/mgmt/OrganizationTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/OrganizationTemplatesClient.java
new file mode 100644
index 000000000..bb876fb92
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/OrganizationTemplatesClient.java
@@ -0,0 +1,150 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.core.SyncPagingIterable;
+import com.auth0.client.mgmt.types.CreateOrganizationTemplateRequestContent;
+import com.auth0.client.mgmt.types.ListOrganizationTemplatesRequestParameters;
+import com.auth0.client.mgmt.types.ListTemplateOrganizationsRequestParameters;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+import com.auth0.client.mgmt.types.OrganizationTemplateAssignedOrganization;
+import com.auth0.client.mgmt.types.UpdateOrganizationTemplateRequestContent;
+
+public class OrganizationTemplatesClient {
+ protected final ClientOptions clientOptions;
+
+ private final RawOrganizationTemplatesClient rawClient;
+
+ public OrganizationTemplatesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ this.rawClient = new RawOrganizationTemplatesClient(clientOptions);
+ }
+
+ /**
+ * Get responses with HTTP metadata like headers
+ */
+ public RawOrganizationTemplatesClient withRawResponse() {
+ return this.rawClient;
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable list() {
+ return this.rawClient.list().body();
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable list(RequestOptions requestOptions) {
+ return this.rawClient.list(requestOptions).body();
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable list(ListOrganizationTemplatesRequestParameters request) {
+ return this.rawClient.list(request).body();
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable list(
+ ListOrganizationTemplatesRequestParameters request, RequestOptions requestOptions) {
+ return this.rawClient.list(request, requestOptions).body();
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public OrganizationTemplate create(CreateOrganizationTemplateRequestContent request) {
+ return this.rawClient.create(request).body();
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public OrganizationTemplate create(
+ CreateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ return this.rawClient.create(request, requestOptions).body();
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public OrganizationTemplate get(String id) {
+ return this.rawClient.get(id).body();
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public OrganizationTemplate get(String id, RequestOptions requestOptions) {
+ return this.rawClient.get(id, requestOptions).body();
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public OrganizationTemplate update(String id) {
+ return this.rawClient.update(id).body();
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public OrganizationTemplate update(String id, RequestOptions requestOptions) {
+ return this.rawClient.update(id, requestOptions).body();
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public OrganizationTemplate update(String id, UpdateOrganizationTemplateRequestContent request) {
+ return this.rawClient.update(id, request).body();
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public OrganizationTemplate update(
+ String id, UpdateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ return this.rawClient.update(id, request, requestOptions).body();
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable listOrganizations(String id) {
+ return this.rawClient.listOrganizations(id).body();
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable listOrganizations(
+ String id, RequestOptions requestOptions) {
+ return this.rawClient.listOrganizations(id, requestOptions).body();
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable listOrganizations(
+ String id, ListTemplateOrganizationsRequestParameters request) {
+ return this.rawClient.listOrganizations(id, request).body();
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public SyncPagingIterable listOrganizations(
+ String id, ListTemplateOrganizationsRequestParameters request, RequestOptions requestOptions) {
+ return this.rawClient.listOrganizations(id, request, requestOptions).body();
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java
index f50ee76cb..15b26958a 100644
--- a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java
@@ -15,6 +15,7 @@
import com.auth0.client.mgmt.organizations.GroupsClient;
import com.auth0.client.mgmt.organizations.InvitationsClient;
import com.auth0.client.mgmt.organizations.MembersClient;
+import com.auth0.client.mgmt.organizations.OrganizationTemplateClient;
import com.auth0.client.mgmt.organizations.roles.RolesClient;
import com.auth0.client.mgmt.types.CreateOrganizationRequestContent;
import com.auth0.client.mgmt.types.CreateOrganizationResponseContent;
@@ -45,6 +46,8 @@ public class OrganizationsClient {
protected final Supplier membersClient;
+ protected final Supplier organizationTemplateClient;
+
protected final Supplier groupsClient;
protected final Supplier rolesClient;
@@ -59,6 +62,7 @@ public OrganizationsClient(ClientOptions clientOptions) {
this.enabledConnectionsClient = Suppliers.memoize(() -> new EnabledConnectionsClient(clientOptions));
this.invitationsClient = Suppliers.memoize(() -> new InvitationsClient(clientOptions));
this.membersClient = Suppliers.memoize(() -> new MembersClient(clientOptions));
+ this.organizationTemplateClient = Suppliers.memoize(() -> new OrganizationTemplateClient(clientOptions));
this.groupsClient = Suppliers.memoize(() -> new GroupsClient(clientOptions));
this.rolesClient = Suppliers.memoize(() -> new RolesClient(clientOptions));
}
@@ -267,6 +271,10 @@ public MembersClient members() {
return this.membersClient.get();
}
+ public OrganizationTemplateClient organizationTemplate() {
+ return this.organizationTemplateClient.get();
+ }
+
public GroupsClient groups() {
return this.groupsClient.get();
}
diff --git a/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java
index c60e8e784..c5ddbd6d3 100644
--- a/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java
@@ -19,6 +19,7 @@
import com.auth0.client.mgmt.errors.NotFoundError;
import com.auth0.client.mgmt.errors.TooManyRequestsError;
import com.auth0.client.mgmt.errors.UnauthorizedError;
+import com.auth0.client.mgmt.errors.UnprocessableEntityError;
import com.auth0.client.mgmt.types.ConnectionForList;
import com.auth0.client.mgmt.types.CreateConnectionRequestContent;
import com.auth0.client.mgmt.types.CreateConnectionResponseContent;
@@ -295,6 +296,9 @@ public ManagementApiHttpResponse create(
case 409:
throw new ConflictError(
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 422:
+ throw new UnprocessableEntityError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
case 429:
throw new TooManyRequestsError(
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
@@ -581,6 +585,9 @@ public ManagementApiHttpResponse update(
case 409:
throw new ConflictError(
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 422:
+ throw new UnprocessableEntityError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
case 429:
throw new TooManyRequestsError(
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
diff --git a/src/main/java/com/auth0/client/mgmt/RawOrganizationTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/RawOrganizationTemplatesClient.java
new file mode 100644
index 000000000..fd3eefb09
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/RawOrganizationTemplatesClient.java
@@ -0,0 +1,530 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.ManagementApiException;
+import com.auth0.client.mgmt.core.ManagementApiHttpResponse;
+import com.auth0.client.mgmt.core.ManagementException;
+import com.auth0.client.mgmt.core.MediaTypes;
+import com.auth0.client.mgmt.core.ObjectMappers;
+import com.auth0.client.mgmt.core.QueryStringMapper;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.core.RetryInterceptor;
+import com.auth0.client.mgmt.core.SyncPagingIterable;
+import com.auth0.client.mgmt.errors.BadRequestError;
+import com.auth0.client.mgmt.errors.ConflictError;
+import com.auth0.client.mgmt.errors.ForbiddenError;
+import com.auth0.client.mgmt.errors.NotFoundError;
+import com.auth0.client.mgmt.errors.TooManyRequestsError;
+import com.auth0.client.mgmt.errors.UnauthorizedError;
+import com.auth0.client.mgmt.types.CreateOrganizationTemplateRequestContent;
+import com.auth0.client.mgmt.types.ListOrganizationTemplatesPaginatedResponseContent;
+import com.auth0.client.mgmt.types.ListOrganizationTemplatesRequestParameters;
+import com.auth0.client.mgmt.types.ListTemplateOrganizationsPaginatedResponseContent;
+import com.auth0.client.mgmt.types.ListTemplateOrganizationsRequestParameters;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+import com.auth0.client.mgmt.types.OrganizationTemplateAssignedOrganization;
+import com.auth0.client.mgmt.types.UpdateOrganizationTemplateRequestContent;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+
+public class RawOrganizationTemplatesClient {
+ protected final ClientOptions clientOptions;
+
+ public RawOrganizationTemplatesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> list() {
+ return list(ListOrganizationTemplatesRequestParameters.builder().build());
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> list(RequestOptions requestOptions) {
+ return list(ListOrganizationTemplatesRequestParameters.builder().build(), requestOptions);
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> list(
+ ListOrganizationTemplatesRequestParameters request) {
+ return list(request, null);
+ }
+
+ /**
+ * Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> list(
+ ListOrganizationTemplatesRequestParameters request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates");
+ if (!request.getFrom().isAbsent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "from", request.getFrom().orElse(null), false);
+ }
+ QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(5), false);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ ListOrganizationTemplatesPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, ListOrganizationTemplatesPaginatedResponseContent.class);
+ Optional startingAfter = parsedResponse.getNext();
+ ListOrganizationTemplatesRequestParameters nextRequest =
+ ListOrganizationTemplatesRequestParameters.builder()
+ .from(request)
+ .from(startingAfter)
+ .build();
+ List result =
+ parsedResponse.getOrganizationTemplates().orElse(Collections.emptyList());
+ return new ManagementApiHttpResponse<>(
+ new SyncPagingIterable(
+ startingAfter.isPresent(), result, parsedResponse, () -> list(
+ nextRequest, requestOptions)
+ .body()),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public ManagementApiHttpResponse create(CreateOrganizationTemplateRequestContent request) {
+ return create(request, null);
+ }
+
+ /**
+ * Create an Organization Template.
+ */
+ public ManagementApiHttpResponse create(
+ CreateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class), response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 409:
+ throw new ConflictError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public ManagementApiHttpResponse get(String id) {
+ return get(id, null);
+ }
+
+ /**
+ * Retrieve details about a single Organization Template specified by ID.
+ */
+ public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates")
+ .addPathSegment(id);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class), response);
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public ManagementApiHttpResponse update(String id) {
+ return update(id, UpdateOrganizationTemplateRequestContent.builder().build());
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) {
+ return update(id, UpdateOrganizationTemplateRequestContent.builder().build(), requestOptions);
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public ManagementApiHttpResponse update(
+ String id, UpdateOrganizationTemplateRequestContent request) {
+ return update(id, request, null);
+ }
+
+ /**
+ * Update the details of a specific Organization Template.
+ */
+ public ManagementApiHttpResponse update(
+ String id, UpdateOrganizationTemplateRequestContent request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates")
+ .addPathSegment(id);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("PATCH", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class), response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> listOrganizations(
+ String id) {
+ return listOrganizations(
+ id, ListTemplateOrganizationsRequestParameters.builder().build());
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> listOrganizations(
+ String id, RequestOptions requestOptions) {
+ return listOrganizations(
+ id, ListTemplateOrganizationsRequestParameters.builder().build(), requestOptions);
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> listOrganizations(
+ String id, ListTemplateOrganizationsRequestParameters request) {
+ return listOrganizations(id, request, null);
+ }
+
+ /**
+ * Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint pagination. Results are returned in a stable order, sorted by their identifier (id) in ascending order.
+ */
+ public ManagementApiHttpResponse> listOrganizations(
+ String id, ListTemplateOrganizationsRequestParameters request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organization-templates")
+ .addPathSegment(id)
+ .addPathSegments("organizations");
+ if (!request.getFrom().isAbsent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "from", request.getFrom().orElse(null), false);
+ }
+ QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(5), false);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ ListTemplateOrganizationsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, ListTemplateOrganizationsPaginatedResponseContent.class);
+ Optional startingAfter = parsedResponse.getNext();
+ ListTemplateOrganizationsRequestParameters nextRequest =
+ ListTemplateOrganizationsRequestParameters.builder()
+ .from(request)
+ .from(startingAfter)
+ .build();
+ List result = parsedResponse.getOrganizations();
+ return new ManagementApiHttpResponse<>(
+ new SyncPagingIterable(
+ startingAfter.isPresent(), result, parsedResponse, () -> listOrganizations(
+ id, nextRequest, requestOptions)
+ .body()),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java
index 2b794ce11..21a854f46 100644
--- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java
+++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java
@@ -17,6 +17,7 @@
import com.auth0.client.mgmt.core.RetryInterceptor;
import com.auth0.client.mgmt.core.SyncPagingIterable;
import com.auth0.client.mgmt.errors.BadRequestError;
+import com.auth0.client.mgmt.errors.ConflictError;
import com.auth0.client.mgmt.errors.ForbiddenError;
import com.auth0.client.mgmt.errors.NotFoundError;
import com.auth0.client.mgmt.errors.TooManyRequestsError;
@@ -374,6 +375,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
response));
return;
+ case 409:
+ future.completeExceptionally(new ConflictError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
}
} catch (JsonProcessingException ignored) {
// unable to map error response, throwing generic error
diff --git a/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java
index da6293f13..f1bd3c16a 100644
--- a/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java
+++ b/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java
@@ -17,6 +17,7 @@
import com.auth0.client.mgmt.core.RetryInterceptor;
import com.auth0.client.mgmt.core.SyncPagingIterable;
import com.auth0.client.mgmt.errors.BadRequestError;
+import com.auth0.client.mgmt.errors.ConflictError;
import com.auth0.client.mgmt.errors.ForbiddenError;
import com.auth0.client.mgmt.errors.NotFoundError;
import com.auth0.client.mgmt.errors.TooManyRequestsError;
@@ -310,6 +311,9 @@ public ManagementApiHttpResponse create(
case 404:
throw new NotFoundError(
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 409:
+ throw new ConflictError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
}
} catch (JsonProcessingException ignored) {
// unable to map error response, throwing generic error
diff --git a/src/main/java/com/auth0/client/mgmt/errors/UnprocessableEntityError.java b/src/main/java/com/auth0/client/mgmt/errors/UnprocessableEntityError.java
new file mode 100644
index 000000000..9491be2ee
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/errors/UnprocessableEntityError.java
@@ -0,0 +1,32 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.errors;
+
+import com.auth0.client.mgmt.core.ManagementApiException;
+import okhttp3.Response;
+
+public final class UnprocessableEntityError extends ManagementApiException {
+ /**
+ * The body of the response that triggered the exception.
+ */
+ private final Object body;
+
+ public UnprocessableEntityError(Object body) {
+ super("UnprocessableEntityError", 422, body);
+ this.body = body;
+ }
+
+ public UnprocessableEntityError(Object body, Response rawResponse) {
+ super("UnprocessableEntityError", 422, body, rawResponse);
+ this.body = body;
+ }
+
+ /**
+ * @return the body
+ */
+ @java.lang.Override
+ public Object body() {
+ return this.body;
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java
index 5812859ac..91d93569e 100644
--- a/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java
@@ -70,4 +70,18 @@ public CompletableFuture get(String id) {
public CompletableFuture get(String id, RequestOptions requestOptions) {
return this.rawClient.get(id, requestOptions).thenApply(response -> response.body());
}
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public CompletableFuture delete(String id) {
+ return this.rawClient.delete(id).thenApply(response -> response.body());
+ }
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public CompletableFuture delete(String id, RequestOptions requestOptions) {
+ return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body());
+ }
}
diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java
index dba3eddbc..27c240e07 100644
--- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java
@@ -360,4 +360,104 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
});
return future;
}
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public CompletableFuture> delete(String id) {
+ return delete(id, null);
+ }
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public CompletableFuture> delete(String id, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("keys/network-acls")
+ .addPathSegment(id);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("DELETE", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ if (response.isSuccessful()) {
+ future.complete(new ManagementApiHttpResponse<>(null, response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 409:
+ future.completeExceptionally(new ConflictError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
}
diff --git a/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java
index ec45e4934..82d36b7e6 100644
--- a/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java
@@ -69,4 +69,18 @@ public NetworkAclKey get(String id) {
public NetworkAclKey get(String id, RequestOptions requestOptions) {
return this.rawClient.get(id, requestOptions).body();
}
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public void delete(String id) {
+ this.rawClient.delete(id).body();
+ }
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public void delete(String id, RequestOptions requestOptions) {
+ this.rawClient.delete(id, requestOptions).body();
+ }
}
diff --git a/src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java
index c6d94a6fa..b2d8df6c4 100644
--- a/src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java
+++ b/src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java
@@ -280,4 +280,80 @@ public ManagementApiHttpResponse get(String id, RequestOptions re
throw new ManagementException("Network error executing HTTP request", e);
}
}
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public ManagementApiHttpResponse delete(String id) {
+ return delete(id, null);
+ }
+
+ /**
+ * Delete a key used to verify HTTP Message Signatures on Network ACL rules
+ */
+ public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("keys/network-acls")
+ .addPathSegment(id);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("DELETE", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ if (response.isSuccessful()) {
+ return new ManagementApiHttpResponse<>(null, response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 409:
+ throw new ConflictError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
}
diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncOrganizationTemplateClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncOrganizationTemplateClient.java
new file mode 100644
index 000000000..fd81a1840
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncOrganizationTemplateClient.java
@@ -0,0 +1,75 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.organizations;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+import java.util.concurrent.CompletableFuture;
+
+public class AsyncOrganizationTemplateClient {
+ protected final ClientOptions clientOptions;
+
+ private final AsyncRawOrganizationTemplateClient rawClient;
+
+ public AsyncOrganizationTemplateClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ this.rawClient = new AsyncRawOrganizationTemplateClient(clientOptions);
+ }
+
+ /**
+ * Get responses with HTTP metadata like headers
+ */
+ public AsyncRawOrganizationTemplateClient withRawResponse() {
+ return this.rawClient;
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public CompletableFuture get(String id) {
+ return this.rawClient.get(id).thenApply(response -> response.body());
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public CompletableFuture get(String id, RequestOptions requestOptions) {
+ return this.rawClient.get(id, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public CompletableFuture assignOrganizationTemplate(String id, String templateId) {
+ return this.rawClient.assignOrganizationTemplate(id, templateId).thenApply(response -> response.body());
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public CompletableFuture assignOrganizationTemplate(
+ String id, String templateId, RequestOptions requestOptions) {
+ return this.rawClient
+ .assignOrganizationTemplate(id, templateId, requestOptions)
+ .thenApply(response -> response.body());
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public CompletableFuture unassignOrganizationTemplate(String id, String templateId) {
+ return this.rawClient.unassignOrganizationTemplate(id, templateId).thenApply(response -> response.body());
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public CompletableFuture unassignOrganizationTemplate(
+ String id, String templateId, RequestOptions requestOptions) {
+ return this.rawClient
+ .unassignOrganizationTemplate(id, templateId, requestOptions)
+ .thenApply(response -> response.body());
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawOrganizationTemplateClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawOrganizationTemplateClient.java
new file mode 100644
index 000000000..2dc59e020
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawOrganizationTemplateClient.java
@@ -0,0 +1,335 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.organizations;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.ManagementApiException;
+import com.auth0.client.mgmt.core.ManagementApiHttpResponse;
+import com.auth0.client.mgmt.core.ManagementException;
+import com.auth0.client.mgmt.core.ObjectMappers;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.core.RetryInterceptor;
+import com.auth0.client.mgmt.errors.BadRequestError;
+import com.auth0.client.mgmt.errors.ForbiddenError;
+import com.auth0.client.mgmt.errors.NotFoundError;
+import com.auth0.client.mgmt.errors.TooManyRequestsError;
+import com.auth0.client.mgmt.errors.UnauthorizedError;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.io.IOException;
+import java.util.concurrent.CompletableFuture;
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+import org.jetbrains.annotations.NotNull;
+
+public class AsyncRawOrganizationTemplateClient {
+ protected final ClientOptions clientOptions;
+
+ public AsyncRawOrganizationTemplateClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public CompletableFuture> get(String id) {
+ return get(id, null);
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public CompletableFuture> get(
+ String id, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organizations")
+ .addPathSegment(id)
+ .addPathSegments("organization-templates");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public CompletableFuture> assignOrganizationTemplate(String id, String templateId) {
+ return assignOrganizationTemplate(id, templateId, null);
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public CompletableFuture> assignOrganizationTemplate(
+ String id, String templateId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organizations")
+ .addPathSegment(id)
+ .addPathSegments("organization-templates")
+ .addPathSegment(templateId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("PUT", RequestBody.create("", null))
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ if (response.isSuccessful()) {
+ future.complete(new ManagementApiHttpResponse<>(null, response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public CompletableFuture> unassignOrganizationTemplate(
+ String id, String templateId) {
+ return unassignOrganizationTemplate(id, templateId, null);
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public CompletableFuture> unassignOrganizationTemplate(
+ String id, String templateId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organizations")
+ .addPathSegment(id)
+ .addPathSegments("organization-templates")
+ .addPathSegment(templateId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("DELETE", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ if (response.isSuccessful()) {
+ future.complete(new ManagementApiHttpResponse<>(null, response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 429:
+ future.completeExceptionally(new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new ManagementException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/organizations/OrganizationTemplateClient.java b/src/main/java/com/auth0/client/mgmt/organizations/OrganizationTemplateClient.java
new file mode 100644
index 000000000..191be5f22
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/organizations/OrganizationTemplateClient.java
@@ -0,0 +1,72 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.organizations;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+
+public class OrganizationTemplateClient {
+ protected final ClientOptions clientOptions;
+
+ private final RawOrganizationTemplateClient rawClient;
+
+ public OrganizationTemplateClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ this.rawClient = new RawOrganizationTemplateClient(clientOptions);
+ }
+
+ /**
+ * Get responses with HTTP metadata like headers
+ */
+ public RawOrganizationTemplateClient withRawResponse() {
+ return this.rawClient;
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public OrganizationTemplate get(String id) {
+ return this.rawClient.get(id).body();
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public OrganizationTemplate get(String id, RequestOptions requestOptions) {
+ return this.rawClient.get(id, requestOptions).body();
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public void assignOrganizationTemplate(String id, String templateId) {
+ this.rawClient.assignOrganizationTemplate(id, templateId).body();
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public void assignOrganizationTemplate(String id, String templateId, RequestOptions requestOptions) {
+ this.rawClient
+ .assignOrganizationTemplate(id, templateId, requestOptions)
+ .body();
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public void unassignOrganizationTemplate(String id, String templateId) {
+ this.rawClient.unassignOrganizationTemplate(id, templateId).body();
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public void unassignOrganizationTemplate(String id, String templateId, RequestOptions requestOptions) {
+ this.rawClient
+ .unassignOrganizationTemplate(id, templateId, requestOptions)
+ .body();
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawOrganizationTemplateClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawOrganizationTemplateClient.java
new file mode 100644
index 000000000..3aacd2d87
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/organizations/RawOrganizationTemplateClient.java
@@ -0,0 +1,262 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.organizations;
+
+import com.auth0.client.mgmt.core.ClientOptions;
+import com.auth0.client.mgmt.core.ManagementApiException;
+import com.auth0.client.mgmt.core.ManagementApiHttpResponse;
+import com.auth0.client.mgmt.core.ManagementException;
+import com.auth0.client.mgmt.core.ObjectMappers;
+import com.auth0.client.mgmt.core.RequestOptions;
+import com.auth0.client.mgmt.core.RetryInterceptor;
+import com.auth0.client.mgmt.errors.BadRequestError;
+import com.auth0.client.mgmt.errors.ForbiddenError;
+import com.auth0.client.mgmt.errors.NotFoundError;
+import com.auth0.client.mgmt.errors.TooManyRequestsError;
+import com.auth0.client.mgmt.errors.UnauthorizedError;
+import com.auth0.client.mgmt.types.OrganizationTemplate;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.io.IOException;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+
+public class RawOrganizationTemplateClient {
+ protected final ClientOptions clientOptions;
+
+ public RawOrganizationTemplateClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public ManagementApiHttpResponse get(String id) {
+ return get(id, null);
+ }
+
+ /**
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
+ */
+ public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organizations")
+ .addPathSegment(id)
+ .addPathSegments("organization-templates");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new ManagementApiHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, OrganizationTemplate.class), response);
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public ManagementApiHttpResponse assignOrganizationTemplate(String id, String templateId) {
+ return assignOrganizationTemplate(id, templateId, null);
+ }
+
+ /**
+ * Assign an Organization Template to an organization.
+ */
+ public ManagementApiHttpResponse assignOrganizationTemplate(
+ String id, String templateId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organizations")
+ .addPathSegment(id)
+ .addPathSegments("organization-templates")
+ .addPathSegment(templateId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("PUT", RequestBody.create("", null))
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ if (response.isSuccessful()) {
+ return new ManagementApiHttpResponse<>(null, response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public ManagementApiHttpResponse unassignOrganizationTemplate(String id, String templateId) {
+ return unassignOrganizationTemplate(id, templateId, null);
+ }
+
+ /**
+ * Remove an Organization Template assignment from an organization.
+ */
+ public ManagementApiHttpResponse unassignOrganizationTemplate(
+ String id, String templateId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("organizations")
+ .addPathSegment(id)
+ .addPathSegments("organization-templates")
+ .addPathSegment(templateId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("DELETE", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ if (response.isSuccessful()) {
+ return new ManagementApiHttpResponse<>(null, response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 429:
+ throw new TooManyRequestsError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new ManagementApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new ManagementException("Network error executing HTTP request", e);
+ }
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java
index 9164ae0cb..509431c6e 100644
--- a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java
+++ b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java
@@ -43,6 +43,9 @@ public final class ActionTriggerTypeEnum {
public static final ActionTriggerTypeEnum SEND_PHONE_MESSAGE =
new ActionTriggerTypeEnum(Value.SEND_PHONE_MESSAGE, "send-phone-message");
+ public static final ActionTriggerTypeEnum POST_CREDENTIAL_VALIDATION =
+ new ActionTriggerTypeEnum(Value.POST_CREDENTIAL_VALIDATION, "post-credential-validation");
+
public static final ActionTriggerTypeEnum EVENT_STREAM =
new ActionTriggerTypeEnum(Value.EVENT_STREAM, "event-stream");
@@ -105,6 +108,8 @@ public T visit(Visitor visitor) {
return visitor.visitPostChangePassword();
case SEND_PHONE_MESSAGE:
return visitor.visitSendPhoneMessage();
+ case POST_CREDENTIAL_VALIDATION:
+ return visitor.visitPostCredentialValidation();
case EVENT_STREAM:
return visitor.visitEventStream();
case POST_LOGIN:
@@ -142,6 +147,8 @@ public static ActionTriggerTypeEnum valueOf(String value) {
return POST_CHANGE_PASSWORD;
case "send-phone-message":
return SEND_PHONE_MESSAGE;
+ case "post-credential-validation":
+ return POST_CREDENTIAL_VALIDATION;
case "event-stream":
return EVENT_STREAM;
case "post-login":
@@ -180,6 +187,8 @@ public enum Value {
SIGNUP_POST_IDENTIFIER,
+ POST_CREDENTIAL_VALIDATION,
+
UNKNOWN
}
@@ -212,6 +221,8 @@ public interface Visitor {
T visitSignupPostIdentifier();
+ T visitPostCredentialValidation();
+
T visitUnknown(String unknownType);
}
}
diff --git a/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfiguration.java
new file mode 100644
index 000000000..7ffadc643
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfiguration.java
@@ -0,0 +1,137 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.types;
+
+import com.auth0.client.mgmt.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = B2BIntegrationConfiguration.Builder.class)
+public final class B2BIntegrationConfiguration {
+ private final Optional> ssoProfiles;
+
+ private final Optional integrationType;
+
+ private final Map additionalProperties;
+
+ private B2BIntegrationConfiguration(
+ Optional> ssoProfiles,
+ Optional integrationType,
+ Map additionalProperties) {
+ this.ssoProfiles = ssoProfiles;
+ this.integrationType = integrationType;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return List of SSO profile IDs linked to this B2B integration client. Maximum 1 entry.
+ */
+ @JsonProperty("sso_profiles")
+ public Optional> getSsoProfiles() {
+ return ssoProfiles;
+ }
+
+ @JsonProperty("integration_type")
+ public Optional getIntegrationType() {
+ return integrationType;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof B2BIntegrationConfiguration && equalTo((B2BIntegrationConfiguration) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(B2BIntegrationConfiguration other) {
+ return ssoProfiles.equals(other.ssoProfiles) && integrationType.equals(other.integrationType);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.ssoProfiles, this.integrationType);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional> ssoProfiles = Optional.empty();
+
+ private Optional integrationType = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(B2BIntegrationConfiguration other) {
+ ssoProfiles(other.getSsoProfiles());
+ integrationType(other.getIntegrationType());
+ return this;
+ }
+
+ /**
+ * List of SSO profile IDs linked to this B2B integration client. Maximum 1 entry.
+ */
+ @JsonSetter(value = "sso_profiles", nulls = Nulls.SKIP)
+ public Builder ssoProfiles(Optional> ssoProfiles) {
+ this.ssoProfiles = ssoProfiles;
+ return this;
+ }
+
+ public Builder ssoProfiles(List ssoProfiles) {
+ this.ssoProfiles = Optional.ofNullable(ssoProfiles);
+ return this;
+ }
+
+ @JsonSetter(value = "integration_type", nulls = Nulls.SKIP)
+ public Builder integrationType(Optional integrationType) {
+ this.integrationType = integrationType;
+ return this;
+ }
+
+ public Builder integrationType(B2BIntegrationConfigurationIntegrationTypeEnum integrationType) {
+ this.integrationType = Optional.ofNullable(integrationType);
+ return this;
+ }
+
+ public B2BIntegrationConfiguration build() {
+ return new B2BIntegrationConfiguration(ssoProfiles, integrationType, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfigurationIntegrationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfigurationIntegrationTypeEnum.java
new file mode 100644
index 000000000..c276229b1
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfigurationIntegrationTypeEnum.java
@@ -0,0 +1,97 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public final class B2BIntegrationConfigurationIntegrationTypeEnum {
+ public static final B2BIntegrationConfigurationIntegrationTypeEnum CUSTOM_AUTH_SERVER =
+ new B2BIntegrationConfigurationIntegrationTypeEnum(Value.CUSTOM_AUTH_SERVER, "custom_auth_server");
+
+ public static final B2BIntegrationConfigurationIntegrationTypeEnum APPLICATION =
+ new B2BIntegrationConfigurationIntegrationTypeEnum(Value.APPLICATION, "application");
+
+ public static final B2BIntegrationConfigurationIntegrationTypeEnum THIRD_PARTY =
+ new B2BIntegrationConfigurationIntegrationTypeEnum(Value.THIRD_PARTY, "third_party");
+
+ private final Value value;
+
+ private final String string;
+
+ B2BIntegrationConfigurationIntegrationTypeEnum(Value value, String string) {
+ this.value = value;
+ this.string = string;
+ }
+
+ public Value getEnumValue() {
+ return value;
+ }
+
+ @java.lang.Override
+ @JsonValue
+ public String toString() {
+ return this.string;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ return (this == other)
+ || (other instanceof B2BIntegrationConfigurationIntegrationTypeEnum
+ && this.string.equals(((B2BIntegrationConfigurationIntegrationTypeEnum) other).string));
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return this.string.hashCode();
+ }
+
+ public T visit(Visitor visitor) {
+ switch (value) {
+ case CUSTOM_AUTH_SERVER:
+ return visitor.visitCustomAuthServer();
+ case APPLICATION:
+ return visitor.visitApplication();
+ case THIRD_PARTY:
+ return visitor.visitThirdParty();
+ case UNKNOWN:
+ default:
+ return visitor.visitUnknown(string);
+ }
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public static B2BIntegrationConfigurationIntegrationTypeEnum valueOf(String value) {
+ switch (value) {
+ case "custom_auth_server":
+ return CUSTOM_AUTH_SERVER;
+ case "application":
+ return APPLICATION;
+ case "third_party":
+ return THIRD_PARTY;
+ default:
+ return new B2BIntegrationConfigurationIntegrationTypeEnum(Value.UNKNOWN, value);
+ }
+ }
+
+ public enum Value {
+ CUSTOM_AUTH_SERVER,
+
+ THIRD_PARTY,
+
+ APPLICATION,
+
+ UNKNOWN
+ }
+
+ public interface Visitor {
+ T visitCustomAuthServer();
+
+ T visitThirdParty();
+
+ T visitApplication();
+
+ T visitUnknown(String unknownType);
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/types/Client.java b/src/main/java/com/auth0/client/mgmt/types/Client.java
index 6ff57f2f1..ce2cb3645 100644
--- a/src/main/java/com/auth0/client/mgmt/types/Client.java
+++ b/src/main/java/com/auth0/client/mgmt/types/Client.java
@@ -132,6 +132,8 @@ public final class Client {
private final Optional expressConfiguration;
+ private final Optional b2BIntegrationConfiguration;
+
private final Optional myOrganizationConfiguration;
private final Optional identityAssertionAuthorizationGrant;
@@ -209,6 +211,7 @@ private Client(
OptionalNullable parRequestExpiry,
Optional tokenQuota,
Optional expressConfiguration,
+ Optional b2BIntegrationConfiguration,
Optional myOrganizationConfiguration,
Optional identityAssertionAuthorizationGrant,
Optional thirdPartySecurityMode,
@@ -274,6 +277,7 @@ private Client(
this.parRequestExpiry = parRequestExpiry;
this.tokenQuota = tokenQuota;
this.expressConfiguration = expressConfiguration;
+ this.b2BIntegrationConfiguration = b2BIntegrationConfiguration;
this.myOrganizationConfiguration = myOrganizationConfiguration;
this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant;
this.thirdPartySecurityMode = thirdPartySecurityMode;
@@ -684,6 +688,11 @@ public Optional getExpressConfiguration() {
return expressConfiguration;
}
+ @JsonProperty("b2b_integration_configuration")
+ public Optional getB2BIntegrationConfiguration() {
+ return b2BIntegrationConfiguration;
+ }
+
@JsonProperty("my_organization_configuration")
public Optional getMyOrganizationConfiguration() {
return myOrganizationConfiguration;
@@ -858,6 +867,7 @@ private boolean equalTo(Client other) {
&& parRequestExpiry.equals(other.parRequestExpiry)
&& tokenQuota.equals(other.tokenQuota)
&& expressConfiguration.equals(other.expressConfiguration)
+ && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration)
&& myOrganizationConfiguration.equals(other.myOrganizationConfiguration)
&& identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant)
&& thirdPartySecurityMode.equals(other.thirdPartySecurityMode)
@@ -927,6 +937,7 @@ public int hashCode() {
this.parRequestExpiry,
this.tokenQuota,
this.expressConfiguration,
+ this.b2BIntegrationConfiguration,
this.myOrganizationConfiguration,
this.identityAssertionAuthorizationGrant,
this.thirdPartySecurityMode,
@@ -1059,6 +1070,8 @@ public static final class Builder {
private Optional expressConfiguration = Optional.empty();
+ private Optional b2BIntegrationConfiguration = Optional.empty();
+
private Optional myOrganizationConfiguration = Optional.empty();
private Optional identityAssertionAuthorizationGrant = Optional.empty();
@@ -1140,6 +1153,7 @@ public Builder from(Client other) {
parRequestExpiry(other.getParRequestExpiry());
tokenQuota(other.getTokenQuota());
expressConfiguration(other.getExpressConfiguration());
+ b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration());
myOrganizationConfiguration(other.getMyOrganizationConfiguration());
identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant());
thirdPartySecurityMode(other.getThirdPartySecurityMode());
@@ -2014,6 +2028,17 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) {
return this;
}
+ @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP)
+ public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) {
+ this.b2BIntegrationConfiguration = b2BIntegrationConfiguration;
+ return this;
+ }
+
+ public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) {
+ this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration);
+ return this;
+ }
+
@JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP)
public Builder myOrganizationConfiguration(
Optional myOrganizationConfiguration) {
@@ -2196,6 +2221,7 @@ public Client build() {
parRequestExpiry,
tokenQuota,
expressConfiguration,
+ b2BIntegrationConfiguration,
myOrganizationConfiguration,
identityAssertionAuthorizationGrant,
thirdPartySecurityMode,
diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java
index 9be55678e..0bfdbff4c 100644
--- a/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java
+++ b/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java
@@ -44,9 +44,6 @@ public final class ClientAppTypeEnum {
public static final ClientAppTypeEnum RMS = new ClientAppTypeEnum(Value.RMS, "rms");
- public static final ClientAppTypeEnum B2B_INTEGRATION =
- new ClientAppTypeEnum(Value.B2B_INTEGRATION, "b2b_integration");
-
public static final ClientAppTypeEnum CLOUDBEES = new ClientAppTypeEnum(Value.CLOUDBEES, "cloudbees");
public static final ClientAppTypeEnum SALESFORCE = new ClientAppTypeEnum(Value.SALESFORCE, "salesforce");
@@ -130,8 +127,6 @@ public T visit(Visitor visitor) {
return visitor.visitEchosign();
case RMS:
return visitor.visitRms();
- case B2B_INTEGRATION:
- return visitor.visitB2BIntegration();
case CLOUDBEES:
return visitor.visitCloudbees();
case SALESFORCE:
@@ -191,8 +186,6 @@ public static ClientAppTypeEnum valueOf(String value) {
return ECHOSIGN;
case "rms":
return RMS;
- case "b2b_integration":
- return B2B_INTEGRATION;
case "cloudbees":
return CLOUDBEES;
case "salesforce":
@@ -227,8 +220,6 @@ public enum Value {
EXPRESS_CONFIGURATION,
- B2B_INTEGRATION,
-
RMS,
BOX,
@@ -283,8 +274,6 @@ public interface Visitor {
T visitExpressConfiguration();
- T visitB2BIntegration();
-
T visitRms();
T visitBox();
diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionDeletionBehaviorEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionDeletionBehaviorEnum.java
new file mode 100644
index 000000000..4dbe7c858
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionDeletionBehaviorEnum.java
@@ -0,0 +1,85 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.auth0.client.mgmt.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public final class ConnectionDeletionBehaviorEnum {
+ public static final ConnectionDeletionBehaviorEnum ALLOW = new ConnectionDeletionBehaviorEnum(Value.ALLOW, "allow");
+
+ public static final ConnectionDeletionBehaviorEnum ALLOW_IF_EMPTY =
+ new ConnectionDeletionBehaviorEnum(Value.ALLOW_IF_EMPTY, "allow_if_empty");
+
+ private final Value value;
+
+ private final String string;
+
+ ConnectionDeletionBehaviorEnum(Value value, String string) {
+ this.value = value;
+ this.string = string;
+ }
+
+ public Value getEnumValue() {
+ return value;
+ }
+
+ @java.lang.Override
+ @JsonValue
+ public String toString() {
+ return this.string;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ return (this == other)
+ || (other instanceof ConnectionDeletionBehaviorEnum
+ && this.string.equals(((ConnectionDeletionBehaviorEnum) other).string));
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return this.string.hashCode();
+ }
+
+ public T visit(Visitor visitor) {
+ switch (value) {
+ case ALLOW:
+ return visitor.visitAllow();
+ case ALLOW_IF_EMPTY:
+ return visitor.visitAllowIfEmpty();
+ case UNKNOWN:
+ default:
+ return visitor.visitUnknown(string);
+ }
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public static ConnectionDeletionBehaviorEnum valueOf(String value) {
+ switch (value) {
+ case "allow":
+ return ALLOW;
+ case "allow_if_empty":
+ return ALLOW_IF_EMPTY;
+ default:
+ return new ConnectionDeletionBehaviorEnum(Value.UNKNOWN, value);
+ }
+ }
+
+ public enum Value {
+ ALLOW,
+
+ ALLOW_IF_EMPTY,
+
+ UNKNOWN
+ }
+
+ public interface Visitor {
+ T visitAllow();
+
+ T visitAllowIfEmpty();
+
+ T visitUnknown(String unknownType);
+ }
+}
diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java
index b57a5be42..7b53e05d5 100644
--- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java
+++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java
@@ -11,6 +11,9 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum BAIDU = new ConnectionIdentityProviderEnum(Value.BAIDU, "baidu");
+ public static final ConnectionIdentityProviderEnum SUPABASE_MCP =
+ new ConnectionIdentityProviderEnum(Value.SUPABASE_MCP, "supabase-mcp");
+
public static final ConnectionIdentityProviderEnum BITLY = new ConnectionIdentityProviderEnum(Value.BITLY, "bitly");
public static final ConnectionIdentityProviderEnum PAYPAL_SANDBOX =
@@ -18,6 +21,12 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum SAMLP = new ConnectionIdentityProviderEnum(Value.SAMLP, "samlp");
+ public static final ConnectionIdentityProviderEnum GUSTO_MCP =
+ new ConnectionIdentityProviderEnum(Value.GUSTO_MCP, "gusto-mcp");
+
+ public static final ConnectionIdentityProviderEnum GITLAB_MCP =
+ new ConnectionIdentityProviderEnum(Value.GITLAB_MCP, "gitlab-mcp");
+
public static final ConnectionIdentityProviderEnum DROPBOX =
new ConnectionIdentityProviderEnum(Value.DROPBOX, "dropbox");
@@ -30,6 +39,9 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum PINGFEDERATE =
new ConnectionIdentityProviderEnum(Value.PINGFEDERATE, "pingfederate");
+ public static final ConnectionIdentityProviderEnum XERO_MCP =
+ new ConnectionIdentityProviderEnum(Value.XERO_MCP, "xero-mcp");
+
public static final ConnectionIdentityProviderEnum THIRTYSEVENSIGNALS =
new ConnectionIdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals");
@@ -37,6 +49,9 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum OIDC = new ConnectionIdentityProviderEnum(Value.OIDC, "oidc");
+ public static final ConnectionIdentityProviderEnum FIGMA_MCP =
+ new ConnectionIdentityProviderEnum(Value.FIGMA_MCP, "figma-mcp");
+
public static final ConnectionIdentityProviderEnum SALESFORCE_COMMUNITY =
new ConnectionIdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community");
@@ -70,17 +85,32 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum PAYPAL =
new ConnectionIdentityProviderEnum(Value.PAYPAL, "paypal");
+ public static final ConnectionIdentityProviderEnum HUBSPOT_MCP =
+ new ConnectionIdentityProviderEnum(Value.HUBSPOT_MCP, "hubspot-mcp");
+
+ public static final ConnectionIdentityProviderEnum LINEAR_MCP =
+ new ConnectionIdentityProviderEnum(Value.LINEAR_MCP, "linear-mcp");
+
public static final ConnectionIdentityProviderEnum LINKEDIN =
new ConnectionIdentityProviderEnum(Value.LINKEDIN, "linkedin");
+ public static final ConnectionIdentityProviderEnum ATLASSIAN_MCP =
+ new ConnectionIdentityProviderEnum(Value.ATLASSIAN_MCP, "atlassian-mcp");
+
public static final ConnectionIdentityProviderEnum GOOGLE_APPS =
new ConnectionIdentityProviderEnum(Value.GOOGLE_APPS, "google-apps");
public static final ConnectionIdentityProviderEnum DWOLLA =
new ConnectionIdentityProviderEnum(Value.DWOLLA, "dwolla");
+ public static final ConnectionIdentityProviderEnum NOTION_MCP =
+ new ConnectionIdentityProviderEnum(Value.NOTION_MCP, "notion-mcp");
+
public static final ConnectionIdentityProviderEnum SHOP = new ConnectionIdentityProviderEnum(Value.SHOP, "shop");
+ public static final ConnectionIdentityProviderEnum CLOUDFLARE_MCP =
+ new ConnectionIdentityProviderEnum(Value.CLOUDFLARE_MCP, "cloudflare-mcp");
+
public static final ConnectionIdentityProviderEnum AUTH0OIDC =
new ConnectionIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc");
@@ -91,12 +121,18 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum AUTH0 = new ConnectionIdentityProviderEnum(Value.AUTH0, "auth0");
+ public static final ConnectionIdentityProviderEnum HEROKU_MCP =
+ new ConnectionIdentityProviderEnum(Value.HEROKU_MCP, "heroku-mcp");
+
public static final ConnectionIdentityProviderEnum GOOGLE_OAUTH2 =
new ConnectionIdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2");
public static final ConnectionIdentityProviderEnum WORDPRESS =
new ConnectionIdentityProviderEnum(Value.WORDPRESS, "wordpress");
+ public static final ConnectionIdentityProviderEnum ASANA_MCP =
+ new ConnectionIdentityProviderEnum(Value.ASANA_MCP, "asana-mcp");
+
public static final ConnectionIdentityProviderEnum EXACT = new ConnectionIdentityProviderEnum(Value.EXACT, "exact");
public static final ConnectionIdentityProviderEnum FITBIT =
@@ -105,15 +141,27 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum EVERNOTE =
new ConnectionIdentityProviderEnum(Value.EVERNOTE, "evernote");
+ public static final ConnectionIdentityProviderEnum SLACK_MCP =
+ new ConnectionIdentityProviderEnum(Value.SLACK_MCP, "slack-mcp");
+
public static final ConnectionIdentityProviderEnum SHAREPOINT =
new ConnectionIdentityProviderEnum(Value.SHAREPOINT, "sharepoint");
public static final ConnectionIdentityProviderEnum SHOPIFY =
new ConnectionIdentityProviderEnum(Value.SHOPIFY, "shopify");
+ public static final ConnectionIdentityProviderEnum VERCEL_MCP =
+ new ConnectionIdentityProviderEnum(Value.VERCEL_MCP, "vercel-mcp");
+
public static final ConnectionIdentityProviderEnum SALESFORCE_SANDBOX =
new ConnectionIdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox");
+ public static final ConnectionIdentityProviderEnum INTERCOM_MCP =
+ new ConnectionIdentityProviderEnum(Value.INTERCOM_MCP, "intercom-mcp");
+
+ public static final ConnectionIdentityProviderEnum SENTRY_MCP =
+ new ConnectionIdentityProviderEnum(Value.SENTRY_MCP, "sentry-mcp");
+
public static final ConnectionIdentityProviderEnum FACEBOOK =
new ConnectionIdentityProviderEnum(Value.FACEBOOK, "facebook");
@@ -127,6 +175,9 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum LINE = new ConnectionIdentityProviderEnum(Value.LINE, "line");
+ public static final ConnectionIdentityProviderEnum DOCUSIGN_MCP =
+ new ConnectionIdentityProviderEnum(Value.DOCUSIGN_MCP, "docusign-mcp");
+
public static final ConnectionIdentityProviderEnum UNTAPPD =
new ConnectionIdentityProviderEnum(Value.UNTAPPD, "untappd");
@@ -136,6 +187,9 @@ public final class ConnectionIdentityProviderEnum {
public static final ConnectionIdentityProviderEnum SALESFORCE =
new ConnectionIdentityProviderEnum(Value.SALESFORCE, "salesforce");
+ public static final ConnectionIdentityProviderEnum PAGERDUTY_MCP =
+ new ConnectionIdentityProviderEnum(Value.PAGERDUTY_MCP, "pagerduty-mcp");
+
public static final ConnectionIdentityProviderEnum BITBUCKET =
new ConnectionIdentityProviderEnum(Value.BITBUCKET, "bitbucket");
@@ -190,12 +244,18 @@ public T visit(Visitor visitor) {
return visitor.visitAd();
case BAIDU:
return visitor.visitBaidu();
+ case SUPABASE_MCP:
+ return visitor.visitSupabaseMcp();
case BITLY:
return visitor.visitBitly();
case PAYPAL_SANDBOX:
return visitor.visitPaypalSandbox();
case SAMLP:
return visitor.visitSamlp();
+ case GUSTO_MCP:
+ return visitor.visitGustoMcp();
+ case GITLAB_MCP:
+ return visitor.visitGitlabMcp();
case DROPBOX:
return visitor.visitDropbox();
case VKONTAKTE:
@@ -204,12 +264,16 @@ public T visit(Visitor visitor) {
return visitor.visitInstagram();
case PINGFEDERATE:
return visitor.visitPingfederate();
+ case XERO_MCP:
+ return visitor.visitXeroMcp();
case THIRTYSEVENSIGNALS:
return visitor.visitThirtysevensignals();
case WAAD:
return visitor.visitWaad();
case OIDC:
return visitor.visitOidc();
+ case FIGMA_MCP:
+ return visitor.visitFigmaMcp();
case SALESFORCE_COMMUNITY:
return visitor.visitSalesforceCommunity();
case DACCOUNT:
@@ -236,14 +300,24 @@ public T visit(Visitor visitor) {
return visitor.visitCustom();
case PAYPAL:
return visitor.visitPaypal();
+ case HUBSPOT_MCP:
+ return visitor.visitHubspotMcp();
+ case LINEAR_MCP:
+ return visitor.visitLinearMcp();
case LINKEDIN:
return visitor.visitLinkedin();
+ case ATLASSIAN_MCP:
+ return visitor.visitAtlassianMcp();
case GOOGLE_APPS:
return visitor.visitGoogleApps();
case DWOLLA:
return visitor.visitDwolla();
+ case NOTION_MCP:
+ return visitor.visitNotionMcp();
case SHOP:
return visitor.visitShop();
+ case CLOUDFLARE_MCP:
+ return visitor.visitCloudflareMcp();
case AUTH0OIDC:
return visitor.visitAuth0Oidc();
case PLANNINGCENTER:
@@ -252,22 +326,34 @@ public T visit(Visitor visitor) {
return visitor.visitOkta();
case AUTH0:
return visitor.visitAuth0();
+ case HEROKU_MCP:
+ return visitor.visitHerokuMcp();
case GOOGLE_OAUTH2:
return visitor.visitGoogleOauth2();
case WORDPRESS:
return visitor.visitWordpress();
+ case ASANA_MCP:
+ return visitor.visitAsanaMcp();
case EXACT:
return visitor.visitExact();
case FITBIT:
return visitor.visitFitbit();
case EVERNOTE:
return visitor.visitEvernote();
+ case SLACK_MCP:
+ return visitor.visitSlackMcp();
case SHAREPOINT:
return visitor.visitSharepoint();
case SHOPIFY:
return visitor.visitShopify();
+ case VERCEL_MCP:
+ return visitor.visitVercelMcp();
case SALESFORCE_SANDBOX:
return visitor.visitSalesforceSandbox();
+ case INTERCOM_MCP:
+ return visitor.visitIntercomMcp();
+ case SENTRY_MCP:
+ return visitor.visitSentryMcp();
case FACEBOOK:
return visitor.visitFacebook();
case APPLE:
@@ -278,12 +364,16 @@ public T visit(Visitor visitor) {
return visitor.visitAmazon();
case LINE:
return visitor.visitLine();
+ case DOCUSIGN_MCP:
+ return visitor.visitDocusignMcp();
case UNTAPPD:
return visitor.visitUntappd();
case GITHUB:
return visitor.visitGithub();
case SALESFORCE:
return visitor.visitSalesforce();
+ case PAGERDUTY_MCP:
+ return visitor.visitPagerdutyMcp();
case BITBUCKET:
return visitor.visitBitbucket();
case OFFICE365:
@@ -309,12 +399,18 @@ public static ConnectionIdentityProviderEnum valueOf(String value) {
return AD;
case "baidu":
return BAIDU;
+ case "supabase-mcp":
+ return SUPABASE_MCP;
case "bitly":
return BITLY;
case "paypal-sandbox":
return PAYPAL_SANDBOX;
case "samlp":
return SAMLP;
+ case "gusto-mcp":
+ return GUSTO_MCP;
+ case "gitlab-mcp":
+ return GITLAB_MCP;
case "dropbox":
return DROPBOX;
case "vkontakte":
@@ -323,12 +419,16 @@ public static ConnectionIdentityProviderEnum valueOf(String value) {
return INSTAGRAM;
case "pingfederate":
return PINGFEDERATE;
+ case "xero-mcp":
+ return XERO_MCP;
case "thirtysevensignals":
return THIRTYSEVENSIGNALS;
case "waad":
return WAAD;
case "oidc":
return OIDC;
+ case "figma-mcp":
+ return FIGMA_MCP;
case "salesforce-community":
return SALESFORCE_COMMUNITY;
case "daccount":
@@ -355,14 +455,24 @@ public static ConnectionIdentityProviderEnum valueOf(String value) {
return CUSTOM;
case "paypal":
return PAYPAL;
+ case "hubspot-mcp":
+ return HUBSPOT_MCP;
+ case "linear-mcp":
+ return LINEAR_MCP;
case "linkedin":
return LINKEDIN;
+ case "atlassian-mcp":
+ return ATLASSIAN_MCP;
case "google-apps":
return GOOGLE_APPS;
case "dwolla":
return DWOLLA;
+ case "notion-mcp":
+ return NOTION_MCP;
case "shop":
return SHOP;
+ case "cloudflare-mcp":
+ return CLOUDFLARE_MCP;
case "auth0-oidc":
return AUTH0OIDC;
case "planningcenter":
@@ -371,22 +481,34 @@ public static ConnectionIdentityProviderEnum valueOf(String value) {
return OKTA;
case "auth0":
return AUTH0;
+ case "heroku-mcp":
+ return HEROKU_MCP;
case "google-oauth2":
return GOOGLE_OAUTH2;
case "wordpress":
return WORDPRESS;
+ case "asana-mcp":
+ return ASANA_MCP;
case "exact":
return EXACT;
case "fitbit":
return FITBIT;
case "evernote":
return EVERNOTE;
+ case "slack-mcp":
+ return SLACK_MCP;
case "sharepoint":
return SHAREPOINT;
case "shopify":
return SHOPIFY;
+ case "vercel-mcp":
+ return VERCEL_MCP;
case "salesforce-sandbox":
return SALESFORCE_SANDBOX;
+ case "intercom-mcp":
+ return INTERCOM_MCP;
+ case "sentry-mcp":
+ return SENTRY_MCP;
case "facebook":
return FACEBOOK;
case "apple":
@@ -397,12 +519,16 @@ public static ConnectionIdentityProviderEnum valueOf(String value) {
return AMAZON;
case "line":
return LINE;
+ case "docusign-mcp":
+ return DOCUSIGN_MCP;
case "untappd":
return UNTAPPD;
case "github":
return GITHUB;
case "salesforce":
return SALESFORCE;
+ case "pagerduty-mcp":
+ return PAGERDUTY_MCP;
case "bitbucket":
return BITBUCKET;
case "office365":
@@ -531,6 +657,42 @@ public enum Value {
YANDEX,
+ NOTION_MCP,
+
+ ASANA_MCP,
+
+ ATLASSIAN_MCP,
+
+ CLOUDFLARE_MCP,
+
+ DOCUSIGN_MCP,
+
+ FIGMA_MCP,
+
+ GITLAB_MCP,
+
+ GUSTO_MCP,
+
+ HEROKU_MCP,
+
+ HUBSPOT_MCP,
+
+ INTERCOM_MCP,
+
+ LINEAR_MCP,
+
+ PAGERDUTY_MCP,
+
+ SENTRY_MCP,
+
+ SLACK_MCP,
+
+ SUPABASE_MCP,
+
+ VERCEL_MCP,
+
+ XERO_MCP,
+
UNKNOWN
}
@@ -645,6 +807,42 @@ public interface Visitor {
T visitYandex();
+ T visitNotionMcp();
+
+ T visitAsanaMcp();
+
+ T visitAtlassianMcp();
+
+ T visitCloudflareMcp();
+
+ T visitDocusignMcp();
+
+ T visitFigmaMcp();
+
+ T visitGitlabMcp();
+
+ T visitGustoMcp();
+
+ T visitHerokuMcp();
+
+ T visitHubspotMcp();
+
+ T visitIntercomMcp();
+
+ T visitLinearMcp();
+
+ T visitPagerdutyMcp();
+
+ T visitSentryMcp();
+
+ T visitSlackMcp();
+
+ T visitSupabaseMcp();
+
+ T visitVercelMcp();
+
+ T visitXeroMcp();
+
T visitUnknown(String unknownType);
}
}
diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java
index 908131fbb..144a8dd8c 100644
--- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java
+++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java
@@ -37,6 +37,8 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm
private final Optional dpopSigningAlg;
+ private final Optional enablePushedAuthorizationRequests;
+
private final Optional iconUrl;
private final Optional idTokenSessionExpirySupported;
@@ -49,6 +51,8 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm
private final Optional oidcMetadata;
+ private final Optional pushedAuthorizationRequestEndpoint;
+
private final Optional scope;
private final Optional sendBackChannelNonce;
@@ -81,12 +85,14 @@ private ConnectionOptionsCommonOidc(
Optional connectionSettings,
Optional> domainAliases,
Optional dpopSigningAlg,
+ Optional enablePushedAuthorizationRequests,
Optional iconUrl,
Optional idTokenSessionExpirySupported,
OptionalNullable> idTokenSignedResponseAlgs,
Optional issuer,
Optional jwksUri,
Optional oidcMetadata,
+ Optional pushedAuthorizationRequestEndpoint,
Optional scope,
Optional sendBackChannelNonce,
Optional setUserRootAttributes,
@@ -105,12 +111,14 @@ private ConnectionOptionsCommonOidc(
this.connectionSettings = connectionSettings;
this.domainAliases = domainAliases;
this.dpopSigningAlg = dpopSigningAlg;
+ this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests;
this.iconUrl = iconUrl;
this.idTokenSessionExpirySupported = idTokenSessionExpirySupported;
this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs;
this.issuer = issuer;
this.jwksUri = jwksUri;
this.oidcMetadata = oidcMetadata;
+ this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint;
this.scope = scope;
this.sendBackChannelNonce = sendBackChannelNonce;
this.setUserRootAttributes = setUserRootAttributes;
@@ -161,6 +169,12 @@ public Optional getDpopSigningAlg() {
return dpopSigningAlg;
}
+ @JsonProperty("enable_pushed_authorization_requests")
+ @java.lang.Override
+ public Optional getEnablePushedAuthorizationRequests() {
+ return enablePushedAuthorizationRequests;
+ }
+
@JsonProperty("icon_url")
@java.lang.Override
public Optional getIconUrl() {
@@ -201,6 +215,12 @@ public Optional getOidcMetadata() {
return oidcMetadata;
}
+ @JsonProperty("pushed_authorization_request_endpoint")
+ @java.lang.Override
+ public Optional getPushedAuthorizationRequestEndpoint() {
+ return pushedAuthorizationRequestEndpoint;
+ }
+
@JsonProperty("scope")
@java.lang.Override
public Optional getScope() {
@@ -322,12 +342,14 @@ private boolean equalTo(ConnectionOptionsCommonOidc other) {
&& connectionSettings.equals(other.connectionSettings)
&& domainAliases.equals(other.domainAliases)
&& dpopSigningAlg.equals(other.dpopSigningAlg)
+ && enablePushedAuthorizationRequests.equals(other.enablePushedAuthorizationRequests)
&& iconUrl.equals(other.iconUrl)
&& idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported)
&& idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs)
&& issuer.equals(other.issuer)
&& jwksUri.equals(other.jwksUri)
&& oidcMetadata.equals(other.oidcMetadata)
+ && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint)
&& scope.equals(other.scope)
&& sendBackChannelNonce.equals(other.sendBackChannelNonce)
&& setUserRootAttributes.equals(other.setUserRootAttributes)
@@ -350,12 +372,14 @@ public int hashCode() {
this.connectionSettings,
this.domainAliases,
this.dpopSigningAlg,
+ this.enablePushedAuthorizationRequests,
this.iconUrl,
this.idTokenSessionExpirySupported,
this.idTokenSignedResponseAlgs,
this.issuer,
this.jwksUri,
this.oidcMetadata,
+ this.pushedAuthorizationRequestEndpoint,
this.scope,
this.sendBackChannelNonce,
this.setUserRootAttributes,
@@ -411,6 +435,10 @@ public interface _FinalStage {
_FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg);
+ _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests);
+
+ _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests);
+
_FinalStage iconUrl(Optional iconUrl);
_FinalStage iconUrl(String iconUrl);
@@ -443,6 +471,10 @@ _FinalStage idTokenSignedResponseAlgs(
_FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata);
+ _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint);
+
+ _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint);
+
_FinalStage scope(Optional scope);
_FinalStage scope(String scope);
@@ -545,6 +577,8 @@ public static final class Builder implements ClientIdStage, _FinalStage {
private Optional scope = Optional.empty();
+ private Optional pushedAuthorizationRequestEndpoint = Optional.empty();
+
private Optional oidcMetadata = Optional.empty();
private Optional jwksUri = Optional.empty();
@@ -558,6 +592,8 @@ public static final class Builder implements ClientIdStage, _FinalStage {
private Optional iconUrl = Optional.empty();
+ private Optional enablePushedAuthorizationRequests = Optional.empty();
+
private Optional dpopSigningAlg = Optional.empty();
private Optional> domainAliases = Optional.empty();
@@ -581,12 +617,14 @@ public Builder from(ConnectionOptionsCommonOidc other) {
connectionSettings(other.getConnectionSettings());
domainAliases(other.getDomainAliases());
dpopSigningAlg(other.getDpopSigningAlg());
+ enablePushedAuthorizationRequests(other.getEnablePushedAuthorizationRequests());
iconUrl(other.getIconUrl());
idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported());
idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs());
issuer(other.getIssuer());
jwksUri(other.getJwksUri());
oidcMetadata(other.getOidcMetadata());
+ pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint());
scope(other.getScope());
sendBackChannelNonce(other.getSendBackChannelNonce());
setUserRootAttributes(other.getSetUserRootAttributes());
@@ -835,6 +873,19 @@ public _FinalStage scope(Optional scope) {
return this;
}
+ @java.lang.Override
+ public _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) {
+ this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP)
+ public _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) {
+ this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint;
+ return this;
+ }
+
@java.lang.Override
public _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata) {
this.oidcMetadata = Optional.ofNullable(oidcMetadata);
@@ -940,6 +991,19 @@ public _FinalStage iconUrl(Optional iconUrl) {
return this;
}
+ @java.lang.Override
+ public _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests) {
+ this.enablePushedAuthorizationRequests = Optional.ofNullable(enablePushedAuthorizationRequests);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "enable_pushed_authorization_requests", nulls = Nulls.SKIP)
+ public _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests) {
+ this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests;
+ return this;
+ }
+
@java.lang.Override
public _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) {
this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg);
@@ -1014,12 +1078,14 @@ public ConnectionOptionsCommonOidc build() {
connectionSettings,
domainAliases,
dpopSigningAlg,
+ enablePushedAuthorizationRequests,
iconUrl,
idTokenSessionExpirySupported,
idTokenSignedResponseAlgs,
issuer,
jwksUri,
oidcMetadata,
+ pushedAuthorizationRequestEndpoint,
scope,
sendBackChannelNonce,
setUserRootAttributes,
diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java
index ab6311bbb..97784d027 100644
--- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java
+++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java
@@ -37,6 +37,8 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc
private final Optional dpopSigningAlg;
+ private final Optional enablePushedAuthorizationRequests;
+
private final Optional iconUrl;
private final Optional idTokenSessionExpirySupported;
@@ -49,6 +51,8 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc
private final Optional oidcMetadata;
+ private final Optional pushedAuthorizationRequestEndpoint;
+
private final Optional scope;
private final Optional sendBackChannelNonce;
@@ -89,12 +93,14 @@ private ConnectionOptionsOidc(
Optional connectionSettings,
Optional> domainAliases,
Optional dpopSigningAlg,
+ Optional enablePushedAuthorizationRequests,
Optional iconUrl,
Optional idTokenSessionExpirySupported,
OptionalNullable> idTokenSignedResponseAlgs,
Optional issuer,
Optional jwksUri,
Optional oidcMetadata,
+ Optional pushedAuthorizationRequestEndpoint,
Optional scope,
Optional sendBackChannelNonce,
Optional setUserRootAttributes,
@@ -117,12 +123,14 @@ private ConnectionOptionsOidc(
this.connectionSettings = connectionSettings;
this.domainAliases = domainAliases;
this.dpopSigningAlg = dpopSigningAlg;
+ this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests;
this.iconUrl = iconUrl;
this.idTokenSessionExpirySupported = idTokenSessionExpirySupported;
this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs;
this.issuer = issuer;
this.jwksUri = jwksUri;
this.oidcMetadata = oidcMetadata;
+ this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint;
this.scope = scope;
this.sendBackChannelNonce = sendBackChannelNonce;
this.setUserRootAttributes = setUserRootAttributes;
@@ -177,6 +185,12 @@ public Optional getDpopSigningAlg() {
return dpopSigningAlg;
}
+ @JsonProperty("enable_pushed_authorization_requests")
+ @java.lang.Override
+ public Optional getEnablePushedAuthorizationRequests() {
+ return enablePushedAuthorizationRequests;
+ }
+
@JsonProperty("icon_url")
@java.lang.Override
public Optional getIconUrl() {
@@ -217,6 +231,12 @@ public Optional getOidcMetadata() {
return oidcMetadata;
}
+ @JsonProperty("pushed_authorization_request_endpoint")
+ @java.lang.Override
+ public Optional getPushedAuthorizationRequestEndpoint() {
+ return pushedAuthorizationRequestEndpoint;
+ }
+
@JsonProperty("scope")
@java.lang.Override
public Optional