diff --git a/reference.md b/reference.md index 1f58e051..5febfe7a 100644 --- a/reference.md +++ b/reference.md @@ -873,7 +873,6 @@ Create a client grant for a machine-to-machine login flow. To learn more, read < client.clientGrants().create( CreateClientGrantRequestContent .builder() - .clientId("client_id") .audience("audience") .build() ); @@ -891,7 +890,7 @@ client.clientGrants().create(
-**clientId:** `String` — ID of the client. +**clientId:** `Optional` — ID of the client.
@@ -1337,7 +1336,7 @@ client.clients().list(
-**q:** `Optional` — Advanced Query in Lucene syntax.
Permitted Queries:
  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results +**q:** `Optional` — Advanced Query in Lucene syntax.
Permitted Queries:
  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results
@@ -3648,7 +3647,7 @@ client.customDomains().list(
-**q:** `Optional` — Query in Lucene query string syntax. +**q:** `Optional` — Query in Lucene query string syntax.
@@ -3801,6 +3800,104 @@ client.customDomains().create( + + + + +
client.customDomains.getDefault() -> GetDefaultDomainResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the tenant's default domain. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.customDomains().getDefault(); +``` +
+
+
+
+ + +
+
+
+ +
client.customDomains.setDefault(request) -> UpdateDefaultDomainResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Set the default custom domain for the tenant. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.customDomains().setDefault( + SetDefaultCustomDomainRequestContent + .builder() + .domain("domain") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**domain:** `String` — The domain to set as the default custom domain. Must be a verified custom domain or the canonical domain. + +
+
+
+
+ +
@@ -12694,7 +12791,7 @@ client.users().list(
-**q:** `Optional` — Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields. +**q:** `Optional` — Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields.
@@ -17229,6 +17326,14 @@ client.clients().credentials().create( **expiresAt:** `Optional` — The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to `public_key` credential type. + + + +
+
+ +**kid:** `Optional` — Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64} +
@@ -23755,6 +23860,7 @@ client.organizations().clientGrants().delete("id", "grant_id");
Retrieve list of all organization discovery domains associated with the specified organization. +This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
@@ -23920,7 +24026,7 @@ client.organizations().discoveryDomains().create(
Retrieve details about a single organization discovery domain specified by domain name. - +This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
@@ -23982,7 +24088,8 @@ client.organizations().discoveryDomains().getByName("id", "discovery_domain");
-Retrieve details about a single organization discovery domain specified by ID. +Retrieve details about a single organization discovery domain specified by ID. +This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncCustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncCustomDomainsClient.java index be8502d7..ebde78fa 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncCustomDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncCustomDomainsClient.java @@ -9,10 +9,13 @@ import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; import com.auth0.client.mgmt.types.CustomDomain; import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; +import com.auth0.client.mgmt.types.GetDefaultDomainResponseContent; import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; +import com.auth0.client.mgmt.types.SetDefaultCustomDomainRequestContent; import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; +import com.auth0.client.mgmt.types.UpdateDefaultDomainResponseContent; import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -100,6 +103,36 @@ public CompletableFuture create( return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); } + /** + * Retrieve the tenant's default domain. + */ + public CompletableFuture getDefault() { + return this.rawClient.getDefault().thenApply(response -> response.body()); + } + + /** + * Retrieve the tenant's default domain. + */ + public CompletableFuture getDefault(RequestOptions requestOptions) { + return this.rawClient.getDefault(requestOptions).thenApply(response -> response.body()); + } + + /** + * Set the default custom domain for the tenant. + */ + public CompletableFuture setDefault( + SetDefaultCustomDomainRequestContent request) { + return this.rawClient.setDefault(request).thenApply(response -> response.body()); + } + + /** + * Set the default custom domain for the tenant. + */ + public CompletableFuture setDefault( + SetDefaultCustomDomainRequestContent request, RequestOptions requestOptions) { + return this.rawClient.setDefault(request, requestOptions).thenApply(response -> response.body()); + } + /** * Retrieve a custom domain configuration and status. */ diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java index 0f0e3c6e..ae9aed4e 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java @@ -21,10 +21,13 @@ import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; import com.auth0.client.mgmt.types.CustomDomain; import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; +import com.auth0.client.mgmt.types.GetDefaultDomainResponseContent; import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; +import com.auth0.client.mgmt.types.SetDefaultCustomDomainRequestContent; import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; +import com.auth0.client.mgmt.types.UpdateDefaultDomainResponseContent; import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -283,6 +286,174 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + /** + * Retrieve the tenant's default domain. + */ + public CompletableFuture> getDefault() { + return getDefault(null); + } + + /** + * Retrieve the tenant's default domain. + */ + public CompletableFuture> getDefault( + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("custom-domains/default"); + 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); + } + 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, GetDefaultDomainResponseContent.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 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 (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; + } + + /** + * Set the default custom domain for the tenant. + */ + public CompletableFuture> setDefault( + SetDefaultCustomDomainRequestContent request) { + return setDefault(request, null); + } + + /** + * Set the default custom domain for the tenant. + */ + public CompletableFuture> setDefault( + SetDefaultCustomDomainRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("custom-domains/default"); + 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); + } + 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, UpdateDefaultDomainResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + 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 (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 custom domain configuration and status. */ diff --git a/src/main/java/com/auth0/client/mgmt/CustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/CustomDomainsClient.java index 304cb722..03f7868b 100644 --- a/src/main/java/com/auth0/client/mgmt/CustomDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/CustomDomainsClient.java @@ -9,10 +9,13 @@ import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; import com.auth0.client.mgmt.types.CustomDomain; import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; +import com.auth0.client.mgmt.types.GetDefaultDomainResponseContent; import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; +import com.auth0.client.mgmt.types.SetDefaultCustomDomainRequestContent; import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; +import com.auth0.client.mgmt.types.UpdateDefaultDomainResponseContent; import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; import java.util.List; @@ -98,6 +101,35 @@ public CreateCustomDomainResponseContent create( return this.rawClient.create(request, requestOptions).body(); } + /** + * Retrieve the tenant's default domain. + */ + public GetDefaultDomainResponseContent getDefault() { + return this.rawClient.getDefault().body(); + } + + /** + * Retrieve the tenant's default domain. + */ + public GetDefaultDomainResponseContent getDefault(RequestOptions requestOptions) { + return this.rawClient.getDefault(requestOptions).body(); + } + + /** + * Set the default custom domain for the tenant. + */ + public UpdateDefaultDomainResponseContent setDefault(SetDefaultCustomDomainRequestContent request) { + return this.rawClient.setDefault(request).body(); + } + + /** + * Set the default custom domain for the tenant. + */ + public UpdateDefaultDomainResponseContent setDefault( + SetDefaultCustomDomainRequestContent request, RequestOptions requestOptions) { + return this.rawClient.setDefault(request, requestOptions).body(); + } + /** * Retrieve a custom domain configuration and status. */ diff --git a/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java index 573008d6..a86f0071 100644 --- a/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java @@ -21,10 +21,13 @@ import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; import com.auth0.client.mgmt.types.CustomDomain; import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; +import com.auth0.client.mgmt.types.GetDefaultDomainResponseContent; import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; +import com.auth0.client.mgmt.types.SetDefaultCustomDomainRequestContent; import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; +import com.auth0.client.mgmt.types.UpdateDefaultDomainResponseContent; import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -235,6 +238,134 @@ public ManagementApiHttpResponse create( } } + /** + * Retrieve the tenant's default domain. + */ + public ManagementApiHttpResponse getDefault() { + return getDefault(null); + } + + /** + * Retrieve the tenant's default domain. + */ + public ManagementApiHttpResponse getDefault(RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("custom-domains/default"); + 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); + } + 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, GetDefaultDomainResponseContent.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 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 (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Set the default custom domain for the tenant. + */ + public ManagementApiHttpResponse setDefault( + SetDefaultCustomDomainRequestContent request) { + return setDefault(request, null); + } + + /** + * Set the default custom domain for the tenant. + */ + public ManagementApiHttpResponse setDefault( + SetDefaultCustomDomainRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("custom-domains/default"); + 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); + } + 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, UpdateDefaultDomainResponseContent.class), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + 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 (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + /** * Retrieve a custom domain configuration and status. */ diff --git a/src/main/java/com/auth0/client/mgmt/clients/types/PostClientCredentialRequestContent.java b/src/main/java/com/auth0/client/mgmt/clients/types/PostClientCredentialRequestContent.java index 074cdfd1..689a4318 100644 --- a/src/main/java/com/auth0/client/mgmt/clients/types/PostClientCredentialRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/clients/types/PostClientCredentialRequestContent.java @@ -38,6 +38,8 @@ public final class PostClientCredentialRequestContent { private final Optional expiresAt; + private final Optional kid; + private final Map additionalProperties; private PostClientCredentialRequestContent( @@ -48,6 +50,7 @@ private PostClientCredentialRequestContent( Optional alg, Optional parseExpiryFromCert, Optional expiresAt, + Optional kid, Map additionalProperties) { this.credentialType = credentialType; this.name = name; @@ -56,6 +59,7 @@ private PostClientCredentialRequestContent( this.alg = alg; this.parseExpiryFromCert = parseExpiryFromCert; this.expiresAt = expiresAt; + this.kid = kid; this.additionalProperties = additionalProperties; } @@ -109,6 +113,14 @@ public Optional getExpiresAt() { return expiresAt; } + /** + * @return Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64} + */ + @JsonProperty("kid") + public Optional getKid() { + return kid; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -128,7 +140,8 @@ private boolean equalTo(PostClientCredentialRequestContent other) { && pem.equals(other.pem) && alg.equals(other.alg) && parseExpiryFromCert.equals(other.parseExpiryFromCert) - && expiresAt.equals(other.expiresAt); + && expiresAt.equals(other.expiresAt) + && kid.equals(other.kid); } @java.lang.Override @@ -140,7 +153,8 @@ public int hashCode() { this.pem, this.alg, this.parseExpiryFromCert, - this.expiresAt); + this.expiresAt, + this.kid); } @java.lang.Override @@ -203,12 +217,21 @@ public interface _FinalStage { _FinalStage expiresAt(Optional expiresAt); _FinalStage expiresAt(OffsetDateTime expiresAt); + + /** + *

Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64}

+ */ + _FinalStage kid(Optional kid); + + _FinalStage kid(String kid); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements CredentialTypeStage, _FinalStage { private ClientCredentialTypeEnum credentialType; + private Optional kid = Optional.empty(); + private Optional expiresAt = Optional.empty(); private Optional parseExpiryFromCert = Optional.empty(); @@ -235,6 +258,7 @@ public Builder from(PostClientCredentialRequestContent other) { alg(other.getAlg()); parseExpiryFromCert(other.getParseExpiryFromCert()); expiresAt(other.getExpiresAt()); + kid(other.getKid()); return this; } @@ -245,6 +269,26 @@ public _FinalStage credentialType(@NotNull ClientCredentialTypeEnum credentialTy return this; } + /** + *

Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64}

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage kid(String kid) { + this.kid = Optional.ofNullable(kid); + return this; + } + + /** + *

Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64}

+ */ + @java.lang.Override + @JsonSetter(value = "kid", nulls = Nulls.SKIP) + public _FinalStage kid(Optional kid) { + this.kid = kid; + return this; + } + /** *

The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to public_key credential type.

* @return Reference to {@code this} so that method calls can be chained together. @@ -361,7 +405,15 @@ public _FinalStage name(Optional name) { @java.lang.Override public PostClientCredentialRequestContent build() { return new PostClientCredentialRequestContent( - credentialType, name, subjectDn, pem, alg, parseExpiryFromCert, expiresAt, additionalProperties); + credentialType, + name, + subjectDn, + pem, + alg, + parseExpiryFromCert, + expiresAt, + kid, + additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncDiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncDiscoveryDomainsClient.java index d938c33f..d06894c7 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncDiscoveryDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncDiscoveryDomainsClient.java @@ -35,6 +35,7 @@ public AsyncRawDiscoveryDomainsClient withRawResponse() { /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture> list(String id) { return this.rawClient.list(id).thenApply(response -> response.body()); @@ -42,6 +43,7 @@ public CompletableFuture> list(S /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture> list( String id, RequestOptions requestOptions) { @@ -50,6 +52,7 @@ public CompletableFuture> list( /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture> list( String id, ListOrganizationDiscoveryDomainsRequestParameters request) { @@ -58,6 +61,7 @@ public CompletableFuture> list( /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture> list( String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { @@ -82,6 +86,7 @@ public CompletableFuture creat /** * Retrieve details about a single organization discovery domain specified by domain name. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture getByName( String id, String discoveryDomain) { @@ -90,6 +95,7 @@ public CompletableFuture ge /** * Retrieve details about a single organization discovery domain specified by domain name. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture getByName( String id, String discoveryDomain, RequestOptions requestOptions) { @@ -98,6 +104,7 @@ public CompletableFuture ge /** * Retrieve details about a single organization discovery domain specified by ID. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture get(String id, String discoveryDomainId) { return this.rawClient.get(id, discoveryDomainId).thenApply(response -> response.body()); @@ -105,6 +112,7 @@ public CompletableFuture get(Stri /** * Retrieve details about a single organization discovery domain specified by ID. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture get( String id, String discoveryDomainId, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java index c3252860..24bda7f4 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java @@ -53,6 +53,7 @@ public AsyncRawDiscoveryDomainsClient(ClientOptions clientOptions) { /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture>> list( String id) { @@ -62,6 +63,7 @@ public CompletableFuture>> list( String id, RequestOptions requestOptions) { @@ -71,6 +73,7 @@ public CompletableFuture>> list( String id, ListOrganizationDiscoveryDomainsRequestParameters request) { @@ -79,6 +82,7 @@ public CompletableFuture>> list( String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { @@ -297,6 +301,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { /** * Retrieve details about a single organization discovery domain specified by domain name. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture> getByName( String id, String discoveryDomain) { @@ -305,6 +310,7 @@ public CompletableFuture> getByName( String id, String discoveryDomain, RequestOptions requestOptions) { @@ -393,6 +399,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { /** * Retrieve details about a single organization discovery domain specified by ID. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public CompletableFuture> get( String id, String discoveryDomainId) { @@ -401,6 +408,7 @@ public CompletableFuture> get( String id, String discoveryDomainId, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/DiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/DiscoveryDomainsClient.java index 294ac013..13131792 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/DiscoveryDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/DiscoveryDomainsClient.java @@ -34,6 +34,7 @@ public RawDiscoveryDomainsClient withRawResponse() { /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public SyncPagingIterable list(String id) { return this.rawClient.list(id).body(); @@ -41,6 +42,7 @@ public SyncPagingIterable list(String id) { /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public SyncPagingIterable list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).body(); @@ -48,6 +50,7 @@ public SyncPagingIterable list(String id, RequestOp /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public SyncPagingIterable list( String id, ListOrganizationDiscoveryDomainsRequestParameters request) { @@ -56,6 +59,7 @@ public SyncPagingIterable list( /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public SyncPagingIterable list( String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { @@ -80,6 +84,7 @@ public CreateOrganizationDiscoveryDomainResponseContent create( /** * Retrieve details about a single organization discovery domain specified by domain name. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public GetOrganizationDiscoveryDomainByNameResponseContent getByName(String id, String discoveryDomain) { return this.rawClient.getByName(id, discoveryDomain).body(); @@ -87,6 +92,7 @@ public GetOrganizationDiscoveryDomainByNameResponseContent getByName(String id, /** * Retrieve details about a single organization discovery domain specified by domain name. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public GetOrganizationDiscoveryDomainByNameResponseContent getByName( String id, String discoveryDomain, RequestOptions requestOptions) { @@ -95,6 +101,7 @@ public GetOrganizationDiscoveryDomainByNameResponseContent getByName( /** * Retrieve details about a single organization discovery domain specified by ID. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public GetOrganizationDiscoveryDomainResponseContent get(String id, String discoveryDomainId) { return this.rawClient.get(id, discoveryDomainId).body(); @@ -102,6 +109,7 @@ public GetOrganizationDiscoveryDomainResponseContent get(String id, String disco /** * Retrieve details about a single organization discovery domain specified by ID. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public GetOrganizationDiscoveryDomainResponseContent get( String id, String discoveryDomainId, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java index c10b3aad..feefc949 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java @@ -48,6 +48,7 @@ public RawDiscoveryDomainsClient(ClientOptions clientOptions) { /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public ManagementApiHttpResponse> list(String id) { return list( @@ -56,6 +57,7 @@ public ManagementApiHttpResponse /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public ManagementApiHttpResponse> list( String id, RequestOptions requestOptions) { @@ -65,6 +67,7 @@ public ManagementApiHttpResponse /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public ManagementApiHttpResponse> list( String id, ListOrganizationDiscoveryDomainsRequestParameters request) { @@ -73,6 +76,7 @@ public ManagementApiHttpResponse /** * Retrieve list of all organization discovery domains associated with the specified organization. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public ManagementApiHttpResponse> list( String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { @@ -234,6 +238,7 @@ public ManagementApiHttpResponse getByName( String id, String discoveryDomain) { @@ -242,6 +247,7 @@ public ManagementApiHttpResponse getByName( String id, String discoveryDomain, RequestOptions requestOptions) { @@ -306,6 +312,7 @@ public ManagementApiHttpResponse get( String id, String discoveryDomainId) { @@ -314,6 +321,7 @@ public ManagementApiHttpResponse /** * Retrieve details about a single organization discovery domain specified by ID. + * This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. */ public ManagementApiHttpResponse get( String id, String discoveryDomainId, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/prompts/types/UpdateAculRequestContent.java b/src/main/java/com/auth0/client/mgmt/prompts/types/UpdateAculRequestContent.java index ae81ec03..0c68fa1c 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/types/UpdateAculRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/types/UpdateAculRequestContent.java @@ -30,13 +30,13 @@ public final class UpdateAculRequestContent { private final Optional renderingMode; - private final Optional> contextConfiguration; + private final OptionalNullable> contextConfiguration; private final OptionalNullable defaultHeadTagsDisabled; private final OptionalNullable usePageTemplate; - private final Optional> headTags; + private final OptionalNullable> headTags; private final OptionalNullable filters; @@ -44,10 +44,10 @@ public final class UpdateAculRequestContent { private UpdateAculRequestContent( Optional renderingMode, - Optional> contextConfiguration, + OptionalNullable> contextConfiguration, OptionalNullable defaultHeadTagsDisabled, OptionalNullable usePageTemplate, - Optional> headTags, + OptionalNullable> headTags, OptionalNullable filters, Map additionalProperties) { this.renderingMode = renderingMode; @@ -67,8 +67,12 @@ public Optional getRenderingMode() { return renderingMode; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { + public OptionalNullable> getContextConfiguration() { + if (contextConfiguration == null) { + return OptionalNullable.absent(); + } return contextConfiguration; } @@ -99,8 +103,12 @@ public OptionalNullable getUsePageTemplate() { /** * @return An array of head tags */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("head_tags") - public Optional> getHeadTags() { + public OptionalNullable> getHeadTags() { + if (headTags == null) { + return OptionalNullable.absent(); + } return headTags; } @@ -113,6 +121,12 @@ public OptionalNullable getFilters() { return filters; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("context_configuration") + private OptionalNullable> _getContextConfiguration() { + return contextConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("default_head_tags_disabled") private OptionalNullable _getDefaultHeadTagsDisabled() { @@ -125,6 +139,12 @@ private OptionalNullable _getUsePageTemplate() { return usePageTemplate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("head_tags") + private OptionalNullable> _getHeadTags() { + return headTags; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("filters") private OptionalNullable _getFilters() { @@ -175,13 +195,13 @@ public static Builder builder() { public static final class Builder { private Optional renderingMode = Optional.empty(); - private Optional> contextConfiguration = Optional.empty(); + private OptionalNullable> contextConfiguration = OptionalNullable.absent(); private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); private OptionalNullable usePageTemplate = OptionalNullable.absent(); - private Optional> headTags = Optional.empty(); + private OptionalNullable> headTags = OptionalNullable.absent(); private OptionalNullable filters = OptionalNullable.absent(); @@ -215,13 +235,35 @@ public Builder renderingMode(AculRenderingModeEnum renderingMode) { } @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { + public Builder contextConfiguration( + @Nullable OptionalNullable> contextConfiguration) { this.contextConfiguration = contextConfiguration; return this; } public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); + this.contextConfiguration = OptionalNullable.of(contextConfiguration); + return this; + } + + public Builder contextConfiguration(Optional> contextConfiguration) { + if (contextConfiguration.isPresent()) { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } else { + this.contextConfiguration = OptionalNullable.absent(); + } + return this; + } + + public Builder contextConfiguration( + com.auth0.client.mgmt.core.Nullable> contextConfiguration) { + if (contextConfiguration.isNull()) { + this.contextConfiguration = OptionalNullable.ofNull(); + } else if (contextConfiguration.isEmpty()) { + this.contextConfiguration = OptionalNullable.absent(); + } else { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } return this; } @@ -297,13 +339,33 @@ public Builder usePageTemplate(com.auth0.client.mgmt.core.Nullable useP *

An array of head tags

*/ @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { + public Builder headTags(@Nullable OptionalNullable> headTags) { this.headTags = headTags; return this; } public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); + this.headTags = OptionalNullable.of(headTags); + return this; + } + + public Builder headTags(Optional> headTags) { + if (headTags.isPresent()) { + this.headTags = OptionalNullable.of(headTags.get()); + } else { + this.headTags = OptionalNullable.absent(); + } + return this; + } + + public Builder headTags(com.auth0.client.mgmt.core.Nullable> headTags) { + if (headTags.isNull()) { + this.headTags = OptionalNullable.ofNull(); + } else if (headTags.isEmpty()) { + this.headTags = OptionalNullable.absent(); + } else { + this.headTags = OptionalNullable.of(headTags.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java index e11c6112..31f5e136 100644 --- a/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java @@ -88,7 +88,7 @@ public final class UpdateTenantSettingsRequestContent { private final OptionalNullable allowOrganizationNameInAuthenticationApi; - private final Optional> acrValuesSupported; + private final OptionalNullable> acrValuesSupported; private final OptionalNullable mtls; @@ -133,7 +133,7 @@ private UpdateTenantSettingsRequestContent( Optional oidcLogout, OptionalNullable customizeMfaInPostloginAction, OptionalNullable allowOrganizationNameInAuthenticationApi, - Optional> acrValuesSupported, + OptionalNullable> acrValuesSupported, OptionalNullable mtls, OptionalNullable pushedAuthorizationRequestsSupported, OptionalNullable authorizationResponseIssParameterSupported, @@ -402,8 +402,12 @@ public OptionalNullable getAllowOrganizationNameInAuthenticationApi() { /** * @return Supported ACR values */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("acr_values_supported") - public Optional> getAcrValuesSupported() { + public OptionalNullable> getAcrValuesSupported() { + if (acrValuesSupported == null) { + return OptionalNullable.absent(); + } return acrValuesSupported; } @@ -529,6 +533,12 @@ private OptionalNullable _getAllowOrganizationNameInAuthenticationApi() return allowOrganizationNameInAuthenticationApi; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("acr_values_supported") + private OptionalNullable> _getAcrValuesSupported() { + return acrValuesSupported; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("mtls") private OptionalNullable _getMtls() { @@ -705,7 +715,7 @@ public static final class Builder { private OptionalNullable allowOrganizationNameInAuthenticationApi = OptionalNullable.absent(); - private Optional> acrValuesSupported = Optional.empty(); + private OptionalNullable> acrValuesSupported = OptionalNullable.absent(); private OptionalNullable mtls = OptionalNullable.absent(); @@ -1297,13 +1307,33 @@ public Builder allowOrganizationNameInAuthenticationApi( *

Supported ACR values

*/ @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) - public Builder acrValuesSupported(Optional> acrValuesSupported) { + public Builder acrValuesSupported(@Nullable OptionalNullable> acrValuesSupported) { this.acrValuesSupported = acrValuesSupported; return this; } public Builder acrValuesSupported(List acrValuesSupported) { - this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported); + return this; + } + + public Builder acrValuesSupported(Optional> acrValuesSupported) { + if (acrValuesSupported.isPresent()) { + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported.get()); + } else { + this.acrValuesSupported = OptionalNullable.absent(); + } + return this; + } + + public Builder acrValuesSupported(com.auth0.client.mgmt.core.Nullable> acrValuesSupported) { + if (acrValuesSupported.isNull()) { + this.acrValuesSupported = OptionalNullable.ofNull(); + } else if (acrValuesSupported.isEmpty()) { + this.acrValuesSupported = OptionalNullable.absent(); + } else { + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/AculConfigsItem.java b/src/main/java/com/auth0/client/mgmt/types/AculConfigsItem.java index 49255784..fba469f3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculConfigsItem.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculConfigsItem.java @@ -31,13 +31,13 @@ public final class AculConfigsItem { private final Optional renderingMode; - private final Optional> contextConfiguration; + private final OptionalNullable> contextConfiguration; private final OptionalNullable defaultHeadTagsDisabled; private final OptionalNullable usePageTemplate; - private final Optional> headTags; + private final OptionalNullable> headTags; private final OptionalNullable filters; @@ -47,10 +47,10 @@ private AculConfigsItem( PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, Optional renderingMode, - Optional> contextConfiguration, + OptionalNullable> contextConfiguration, OptionalNullable defaultHeadTagsDisabled, OptionalNullable usePageTemplate, - Optional> headTags, + OptionalNullable> headTags, OptionalNullable filters, Map additionalProperties) { this.prompt = prompt; @@ -82,8 +82,12 @@ public Optional getRenderingMode() { return renderingMode; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { + public OptionalNullable> getContextConfiguration() { + if (contextConfiguration == null) { + return OptionalNullable.absent(); + } return contextConfiguration; } @@ -114,8 +118,12 @@ public OptionalNullable getUsePageTemplate() { /** * @return An array of head tags */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("head_tags") - public Optional> getHeadTags() { + public OptionalNullable> getHeadTags() { + if (headTags == null) { + return OptionalNullable.absent(); + } return headTags; } @@ -128,6 +136,12 @@ public OptionalNullable getFilters() { return filters; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("context_configuration") + private OptionalNullable> _getContextConfiguration() { + return contextConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("default_head_tags_disabled") private OptionalNullable _getDefaultHeadTagsDisabled() { @@ -140,6 +154,12 @@ private OptionalNullable _getUsePageTemplate() { return usePageTemplate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("head_tags") + private OptionalNullable> _getHeadTags() { + return headTags; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("filters") private OptionalNullable _getFilters() { @@ -214,10 +234,16 @@ public interface _FinalStage { _FinalStage renderingMode(AculRenderingModeEnum renderingMode); - _FinalStage contextConfiguration(Optional> contextConfiguration); + _FinalStage contextConfiguration( + @Nullable OptionalNullable> contextConfiguration); _FinalStage contextConfiguration(List contextConfiguration); + _FinalStage contextConfiguration(Optional> contextConfiguration); + + _FinalStage contextConfiguration( + com.auth0.client.mgmt.core.Nullable> contextConfiguration); + /** *

Override Universal Login default head tags

*/ @@ -243,10 +269,14 @@ public interface _FinalStage { /** *

An array of head tags

*/ - _FinalStage headTags(Optional> headTags); + _FinalStage headTags(@Nullable OptionalNullable> headTags); _FinalStage headTags(List headTags); + _FinalStage headTags(Optional> headTags); + + _FinalStage headTags(com.auth0.client.mgmt.core.Nullable> headTags); + _FinalStage filters(@Nullable OptionalNullable filters); _FinalStage filters(AculFilters filters); @@ -264,13 +294,13 @@ public static final class Builder implements PromptStage, ScreenStage, _FinalSta private OptionalNullable filters = OptionalNullable.absent(); - private Optional> headTags = Optional.empty(); + private OptionalNullable> headTags = OptionalNullable.absent(); private OptionalNullable usePageTemplate = OptionalNullable.absent(); private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); - private Optional> contextConfiguration = Optional.empty(); + private OptionalNullable> contextConfiguration = OptionalNullable.absent(); private Optional renderingMode = Optional.empty(); @@ -341,13 +371,43 @@ public _FinalStage filters(@Nullable OptionalNullable filters) { return this; } + /** + *

An array of head tags

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage headTags(com.auth0.client.mgmt.core.Nullable> headTags) { + if (headTags.isNull()) { + this.headTags = OptionalNullable.ofNull(); + } else if (headTags.isEmpty()) { + this.headTags = OptionalNullable.absent(); + } else { + this.headTags = OptionalNullable.of(headTags.get()); + } + return this; + } + + /** + *

An array of head tags

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage headTags(Optional> headTags) { + if (headTags.isPresent()) { + this.headTags = OptionalNullable.of(headTags.get()); + } else { + this.headTags = OptionalNullable.absent(); + } + return this; + } + /** *

An array of head tags

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override public _FinalStage headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); + this.headTags = OptionalNullable.of(headTags); return this; } @@ -356,7 +416,7 @@ public _FinalStage headTags(List headTags) { */ @java.lang.Override @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public _FinalStage headTags(Optional> headTags) { + public _FinalStage headTags(@Nullable OptionalNullable> headTags) { this.headTags = headTags; return this; } @@ -462,15 +522,39 @@ public _FinalStage defaultHeadTagsDisabled(@Nullable OptionalNullable d return this; } + @java.lang.Override + public _FinalStage contextConfiguration( + com.auth0.client.mgmt.core.Nullable> contextConfiguration) { + if (contextConfiguration.isNull()) { + this.contextConfiguration = OptionalNullable.ofNull(); + } else if (contextConfiguration.isEmpty()) { + this.contextConfiguration = OptionalNullable.absent(); + } else { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage contextConfiguration(Optional> contextConfiguration) { + if (contextConfiguration.isPresent()) { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } else { + this.contextConfiguration = OptionalNullable.absent(); + } + return this; + } + @java.lang.Override public _FinalStage contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); + this.contextConfiguration = OptionalNullable.of(contextConfiguration); return this; } @java.lang.Override @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public _FinalStage contextConfiguration(Optional> contextConfiguration) { + public _FinalStage contextConfiguration( + @Nullable OptionalNullable> contextConfiguration) { this.contextConfiguration = contextConfiguration; return this; } 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 6ef26506..6784659e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/Client.java +++ b/src/main/java/com/auth0/client/mgmt/types/Client.java @@ -64,7 +64,7 @@ public final class Client { private final Optional jwtConfiguration; - private final Optional> signingKeys; + private final OptionalNullable> signingKeys; private final OptionalNullable encryptionKey; @@ -153,7 +153,7 @@ private Client( Optional oidcLogout, Optional> grantTypes, Optional jwtConfiguration, - Optional> signingKeys, + OptionalNullable> signingKeys, OptionalNullable encryptionKey, Optional sso, Optional ssoDisabled, @@ -395,8 +395,12 @@ public Optional getJwtConfiguration() { return jwtConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("signing_keys") - public Optional> getSigningKeys() { + public OptionalNullable> getSigningKeys() { + if (signingKeys == null) { + return OptionalNullable.absent(); + } return signingKeys; } @@ -640,6 +644,12 @@ private OptionalNullable _getSessionTransfer return sessionTransfer; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("signing_keys") + private OptionalNullable> _getSigningKeys() { + return signingKeys; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("encryption_key") private OptionalNullable _getEncryptionKey() { @@ -853,7 +863,7 @@ public static final class Builder { private Optional jwtConfiguration = Optional.empty(); - private Optional> signingKeys = Optional.empty(); + private OptionalNullable> signingKeys = OptionalNullable.absent(); private OptionalNullable encryptionKey = OptionalNullable.absent(); @@ -1272,13 +1282,33 @@ public Builder jwtConfiguration(ClientJwtConfiguration jwtConfiguration) { } @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { + public Builder signingKeys(@Nullable OptionalNullable> signingKeys) { this.signingKeys = signingKeys; return this; } public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); + this.signingKeys = OptionalNullable.of(signingKeys); + return this; + } + + public Builder signingKeys(Optional> signingKeys) { + if (signingKeys.isPresent()) { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } else { + this.signingKeys = OptionalNullable.absent(); + } + return this; + } + + public Builder signingKeys(com.auth0.client.mgmt.core.Nullable> signingKeys) { + if (signingKeys.isNull()) { + this.signingKeys = OptionalNullable.ofNull(); + } else if (signingKeys.isEmpty()) { + this.signingKeys = OptionalNullable.absent(); + } else { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenConfiguration.java index b89d96d7..6fcf2c69 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenConfiguration.java @@ -3,7 +3,9 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -18,6 +20,7 @@ import java.util.Objects; import java.util.Optional; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ClientRefreshTokenConfiguration.Builder.class) @@ -36,7 +39,7 @@ public final class ClientRefreshTokenConfiguration { private final Optional infiniteIdleTokenLifetime; - private final Optional> policies; + private final OptionalNullable> policies; private final Map additionalProperties; @@ -48,7 +51,7 @@ private ClientRefreshTokenConfiguration( Optional infiniteTokenLifetime, Optional idleTokenLifetime, Optional infiniteIdleTokenLifetime, - Optional> policies, + OptionalNullable> policies, Map additionalProperties) { this.rotationType = rotationType; this.expirationType = expirationType; @@ -114,8 +117,18 @@ public Optional getInfiniteIdleTokenLifetime() { /** * @return A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("policies") - public Optional> getPolicies() { + public OptionalNullable> getPolicies() { + if (policies == null) { + return OptionalNullable.absent(); + } + return policies; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("policies") + private OptionalNullable> _getPolicies() { return policies; } @@ -218,9 +231,13 @@ public interface _FinalStage { /** *

A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers

*/ - _FinalStage policies(Optional> policies); + _FinalStage policies(@Nullable OptionalNullable> policies); _FinalStage policies(List policies); + + _FinalStage policies(Optional> policies); + + _FinalStage policies(com.auth0.client.mgmt.core.Nullable> policies); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -229,7 +246,7 @@ public static final class Builder implements RotationTypeStage, ExpirationTypeSt private RefreshTokenExpirationTypeEnum expirationType; - private Optional> policies = Optional.empty(); + private OptionalNullable> policies = OptionalNullable.absent(); private Optional infiniteIdleTokenLifetime = Optional.empty(); @@ -273,13 +290,43 @@ public _FinalStage expirationType(@NotNull RefreshTokenExpirationTypeEnum expira return this; } + /** + *

A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage policies(com.auth0.client.mgmt.core.Nullable> policies) { + if (policies.isNull()) { + this.policies = OptionalNullable.ofNull(); + } else if (policies.isEmpty()) { + this.policies = OptionalNullable.absent(); + } else { + this.policies = OptionalNullable.of(policies.get()); + } + return this; + } + + /** + *

A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage policies(Optional> policies) { + if (policies.isPresent()) { + this.policies = OptionalNullable.of(policies.get()); + } else { + this.policies = OptionalNullable.absent(); + } + return this; + } + /** *

A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override public _FinalStage policies(List policies) { - this.policies = Optional.ofNullable(policies); + this.policies = OptionalNullable.of(policies); return this; } @@ -288,7 +335,7 @@ public _FinalStage policies(List policies) { */ @java.lang.Override @JsonSetter(value = "policies", nulls = Nulls.SKIP) - public _FinalStage policies(Optional> policies) { + public _FinalStage policies(@Nullable OptionalNullable> policies) { this.policies = policies; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java index 5d09f787..9132aa60 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java @@ -3,7 +3,9 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -17,6 +19,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ClientSessionTransferConfiguration.Builder.class) @@ -25,7 +28,8 @@ public final class ClientSessionTransferConfiguration { private final Optional enforceCascadeRevocation; - private final Optional> allowedAuthenticationMethods; + private final OptionalNullable> + allowedAuthenticationMethods; private final Optional enforceDeviceBinding; @@ -38,7 +42,7 @@ public final class ClientSessionTransferConfiguration { private ClientSessionTransferConfiguration( Optional canCreateSessionTransferToken, Optional enforceCascadeRevocation, - Optional> allowedAuthenticationMethods, + OptionalNullable> allowedAuthenticationMethods, Optional enforceDeviceBinding, Optional allowRefreshToken, Optional enforceOnlineRefreshTokens, @@ -71,8 +75,13 @@ public Optional getEnforceCascadeRevocation() { /** * @return Indicates whether an app can create a session from a Session Transfer Token received via indicated methods. Can include cookie and/or query. Usually configured in the web application. Default value is an empty array []. */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("allowed_authentication_methods") - public Optional> getAllowedAuthenticationMethods() { + public OptionalNullable> + getAllowedAuthenticationMethods() { + if (allowedAuthenticationMethods == null) { + return OptionalNullable.absent(); + } return allowedAuthenticationMethods; } @@ -97,6 +106,13 @@ public Optional getEnforceOnlineRefreshTokens() { return enforceOnlineRefreshTokens; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("allowed_authentication_methods") + private OptionalNullable> + _getAllowedAuthenticationMethods() { + return allowedAuthenticationMethods; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -144,8 +160,8 @@ public static final class Builder { private Optional enforceCascadeRevocation = Optional.empty(); - private Optional> allowedAuthenticationMethods = - Optional.empty(); + private OptionalNullable> + allowedAuthenticationMethods = OptionalNullable.absent(); private Optional enforceDeviceBinding = Optional.empty(); @@ -201,14 +217,39 @@ public Builder enforceCascadeRevocation(Boolean enforceCascadeRevocation) { */ @JsonSetter(value = "allowed_authentication_methods", nulls = Nulls.SKIP) public Builder allowedAuthenticationMethods( - Optional> allowedAuthenticationMethods) { + @Nullable + OptionalNullable> + allowedAuthenticationMethods) { this.allowedAuthenticationMethods = allowedAuthenticationMethods; return this; } public Builder allowedAuthenticationMethods( List allowedAuthenticationMethods) { - this.allowedAuthenticationMethods = Optional.ofNullable(allowedAuthenticationMethods); + this.allowedAuthenticationMethods = OptionalNullable.of(allowedAuthenticationMethods); + return this; + } + + public Builder allowedAuthenticationMethods( + Optional> allowedAuthenticationMethods) { + if (allowedAuthenticationMethods.isPresent()) { + this.allowedAuthenticationMethods = OptionalNullable.of(allowedAuthenticationMethods.get()); + } else { + this.allowedAuthenticationMethods = OptionalNullable.absent(); + } + return this; + } + + public Builder allowedAuthenticationMethods( + com.auth0.client.mgmt.core.Nullable> + allowedAuthenticationMethods) { + if (allowedAuthenticationMethods.isNull()) { + this.allowedAuthenticationMethods = OptionalNullable.ofNull(); + } else if (allowedAuthenticationMethods.isEmpty()) { + this.allowedAuthenticationMethods = OptionalNullable.absent(); + } else { + this.allowedAuthenticationMethods = OptionalNullable.of(allowedAuthenticationMethods.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java deleted file mode 100644 index cb4e688a..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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 ConnectionDpopSigningAlgEnum { - public static final ConnectionDpopSigningAlgEnum ES256 = new ConnectionDpopSigningAlgEnum(Value.ES256, "ES256"); - - public static final ConnectionDpopSigningAlgEnum ED25519 = - new ConnectionDpopSigningAlgEnum(Value.ED25519, "Ed25519"); - - private final Value value; - - private final String string; - - ConnectionDpopSigningAlgEnum(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 ConnectionDpopSigningAlgEnum - && this.string.equals(((ConnectionDpopSigningAlgEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ES256: - return visitor.visitEs256(); - case ED25519: - return visitor.visitEd25519(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionDpopSigningAlgEnum valueOf(String value) { - switch (value) { - case "ES256": - return ES256; - case "Ed25519": - return ED25519; - default: - return new ConnectionDpopSigningAlgEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ES256, - - ED25519, - - UNKNOWN - } - - public interface Visitor { - T visitEs256(); - - T visitEd25519(); - - 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 46a05563..0c587444 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java @@ -35,8 +35,6 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm private final Optional> domainAliases; - private final Optional dpopSigningAlg; - private final OptionalNullable federatedConnectionsAccessTokens; private final Optional iconUrl; @@ -76,7 +74,6 @@ private ConnectionOptionsCommonOidc( Optional clientSecret, Optional connectionSettings, Optional> domainAliases, - Optional dpopSigningAlg, OptionalNullable federatedConnectionsAccessTokens, Optional iconUrl, OptionalNullable> idTokenSignedResponseAlgs, @@ -98,7 +95,6 @@ private ConnectionOptionsCommonOidc( this.clientSecret = clientSecret; this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; - this.dpopSigningAlg = dpopSigningAlg; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.iconUrl = iconUrl; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; @@ -147,12 +143,6 @@ public Optional> getDomainAliases() { return domainAliases; } - @JsonProperty("dpop_signing_alg") - @java.lang.Override - public Optional getDpopSigningAlg() { - return dpopSigningAlg; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("federated_connections_access_tokens") @java.lang.Override @@ -311,7 +301,6 @@ private boolean equalTo(ConnectionOptionsCommonOidc other) { && clientSecret.equals(other.clientSecret) && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) - && dpopSigningAlg.equals(other.dpopSigningAlg) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && iconUrl.equals(other.iconUrl) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) @@ -337,7 +326,6 @@ public int hashCode() { this.clientSecret, this.connectionSettings, this.domainAliases, - this.dpopSigningAlg, this.federatedConnectionsAccessTokens, this.iconUrl, this.idTokenSignedResponseAlgs, @@ -393,10 +381,6 @@ public interface _FinalStage { _FinalStage domainAliases(List domainAliases); - _FinalStage dpopSigningAlg(Optional dpopSigningAlg); - - _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); - _FinalStage federatedConnectionsAccessTokens( @Nullable OptionalNullable federatedConnectionsAccessTokens); @@ -541,8 +525,6 @@ public static final class Builder implements ClientIdStage, _FinalStage { private OptionalNullable federatedConnectionsAccessTokens = OptionalNullable.absent(); - private Optional dpopSigningAlg = Optional.empty(); - private Optional> domainAliases = Optional.empty(); private Optional connectionSettings = Optional.empty(); @@ -563,7 +545,6 @@ public Builder from(ConnectionOptionsCommonOidc other) { clientSecret(other.getClientSecret()); connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); - dpopSigningAlg(other.getDpopSigningAlg()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); iconUrl(other.getIconUrl()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); @@ -921,19 +902,6 @@ public _FinalStage federatedConnectionsAccessTokens( return this; } - @java.lang.Override - public _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { - this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) - public _FinalStage dpopSigningAlg(Optional dpopSigningAlg) { - this.dpopSigningAlg = dpopSigningAlg; - return this; - } - @java.lang.Override public _FinalStage domainAliases(List domainAliases) { this.domainAliases = Optional.ofNullable(domainAliases); @@ -994,7 +962,6 @@ public ConnectionOptionsCommonOidc build() { clientSecret, connectionSettings, domainAliases, - dpopSigningAlg, federatedConnectionsAccessTokens, iconUrl, idTokenSignedResponseAlgs, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java index a2646f05..63abb262 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java @@ -36,6 +36,8 @@ public final class ConnectionOptionsGoogleApps implements IConnectionOptionsComm private final Optional allowSettingLoginScopes; + private final Optional apiEnableGroups; + private final Optional apiEnableUsers; private final String clientId; @@ -85,6 +87,7 @@ private ConnectionOptionsGoogleApps( Optional adminAccessTokenExpiresin, Optional adminRefreshToken, Optional allowSettingLoginScopes, + Optional apiEnableGroups, Optional apiEnableUsers, String clientId, Optional clientSecret, @@ -111,6 +114,7 @@ private ConnectionOptionsGoogleApps( this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; this.adminRefreshToken = adminRefreshToken; this.allowSettingLoginScopes = allowSettingLoginScopes; + this.apiEnableGroups = apiEnableGroups; this.apiEnableUsers = apiEnableUsers; this.clientId = clientId; this.clientSecret = clientSecret; @@ -163,6 +167,11 @@ public Optional getAllowSettingLoginScopes() { return allowSettingLoginScopes; } + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + @JsonProperty("api_enable_users") public Optional getApiEnableUsers() { return apiEnableUsers; @@ -313,6 +322,7 @@ private boolean equalTo(ConnectionOptionsGoogleApps other) { && adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) && adminRefreshToken.equals(other.adminRefreshToken) && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) + && apiEnableGroups.equals(other.apiEnableGroups) && apiEnableUsers.equals(other.apiEnableUsers) && clientId.equals(other.clientId) && clientSecret.equals(other.clientSecret) @@ -343,6 +353,7 @@ public int hashCode() { this.adminAccessTokenExpiresin, this.adminRefreshToken, this.allowSettingLoginScopes, + this.apiEnableGroups, this.apiEnableUsers, this.clientId, this.clientSecret, @@ -410,6 +421,10 @@ public interface _FinalStage { _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes); + _FinalStage apiEnableGroups(Optional apiEnableGroups); + + _FinalStage apiEnableGroups(Boolean apiEnableGroups); + _FinalStage apiEnableUsers(Optional apiEnableUsers); _FinalStage apiEnableUsers(Boolean apiEnableUsers); @@ -565,6 +580,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional apiEnableUsers = Optional.empty(); + private Optional apiEnableGroups = Optional.empty(); + private Optional allowSettingLoginScopes = Optional.empty(); private Optional adminRefreshToken = Optional.empty(); @@ -587,6 +604,7 @@ public Builder from(ConnectionOptionsGoogleApps other) { adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); adminRefreshToken(other.getAdminRefreshToken()); allowSettingLoginScopes(other.getAllowSettingLoginScopes()); + apiEnableGroups(other.getApiEnableGroups()); apiEnableUsers(other.getApiEnableUsers()); clientId(other.getClientId()); clientSecret(other.getClientSecret()); @@ -950,6 +968,19 @@ public _FinalStage apiEnableUsers(Optional apiEnableUsers) { return this; } + @java.lang.Override + public _FinalStage apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + + @java.lang.Override + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public _FinalStage apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + /** *

When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

* @return Reference to {@code this} so that method calls can be chained together. @@ -1030,6 +1061,7 @@ public ConnectionOptionsGoogleApps build() { adminAccessTokenExpiresin, adminRefreshToken, allowSettingLoginScopes, + apiEnableGroups, apiEnableUsers, clientId, clientSecret, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsMiicard.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsMiicard.java deleted file mode 100644 index 2b3f7a88..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsMiicard.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -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; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsMiicard.Builder.class) -public final class ConnectionOptionsMiicard implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsMiicard( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsMiicard && equalTo((ConnectionOptionsMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsMiicard other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @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 clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsMiicard other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsMiicard build() { - return new ConnectionOptionsMiicard( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - 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/ConnectionOptionsOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java index 457cc8d0..35f3c9d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java @@ -35,8 +35,6 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc private final Optional> domainAliases; - private final Optional dpopSigningAlg; - private final OptionalNullable federatedConnectionsAccessTokens; private final Optional iconUrl; @@ -84,7 +82,6 @@ private ConnectionOptionsOidc( Optional clientSecret, Optional connectionSettings, Optional> domainAliases, - Optional dpopSigningAlg, OptionalNullable federatedConnectionsAccessTokens, Optional iconUrl, OptionalNullable> idTokenSignedResponseAlgs, @@ -110,7 +107,6 @@ private ConnectionOptionsOidc( this.clientSecret = clientSecret; this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; - this.dpopSigningAlg = dpopSigningAlg; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.iconUrl = iconUrl; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; @@ -163,12 +159,6 @@ public Optional> getDomainAliases() { return domainAliases; } - @JsonProperty("dpop_signing_alg") - @java.lang.Override - public Optional getDpopSigningAlg() { - return dpopSigningAlg; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("federated_connections_access_tokens") @java.lang.Override @@ -348,7 +338,6 @@ private boolean equalTo(ConnectionOptionsOidc other) { && clientSecret.equals(other.clientSecret) && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) - && dpopSigningAlg.equals(other.dpopSigningAlg) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && iconUrl.equals(other.iconUrl) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) @@ -378,7 +367,6 @@ public int hashCode() { this.clientSecret, this.connectionSettings, this.domainAliases, - this.dpopSigningAlg, this.federatedConnectionsAccessTokens, this.iconUrl, this.idTokenSignedResponseAlgs, @@ -438,10 +426,6 @@ public interface _FinalStage { _FinalStage domainAliases(List domainAliases); - _FinalStage dpopSigningAlg(Optional dpopSigningAlg); - - _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); - _FinalStage federatedConnectionsAccessTokens( @Nullable OptionalNullable federatedConnectionsAccessTokens); @@ -610,8 +594,6 @@ public static final class Builder implements ClientIdStage, _FinalStage { private OptionalNullable federatedConnectionsAccessTokens = OptionalNullable.absent(); - private Optional dpopSigningAlg = Optional.empty(); - private Optional> domainAliases = Optional.empty(); private Optional connectionSettings = Optional.empty(); @@ -632,7 +614,6 @@ public Builder from(ConnectionOptionsOidc other) { clientSecret(other.getClientSecret()); connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); - dpopSigningAlg(other.getDpopSigningAlg()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); iconUrl(other.getIconUrl()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); @@ -1046,19 +1027,6 @@ public _FinalStage federatedConnectionsAccessTokens( return this; } - @java.lang.Override - public _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { - this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) - public _FinalStage dpopSigningAlg(Optional dpopSigningAlg) { - this.dpopSigningAlg = dpopSigningAlg; - return this; - } - @java.lang.Override public _FinalStage domainAliases(List domainAliases) { this.domainAliases = Optional.ofNullable(domainAliases); @@ -1119,7 +1087,6 @@ public ConnectionOptionsOidc build() { clientSecret, connectionSettings, domainAliases, - dpopSigningAlg, federatedConnectionsAccessTokens, iconUrl, idTokenSignedResponseAlgs, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java index 376926ca..b25024be 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java @@ -37,8 +37,6 @@ public final class ConnectionOptionsOkta implements IConnectionOptionsCommon, IC private final Optional> domainAliases; - private final Optional dpopSigningAlg; - private final OptionalNullable federatedConnectionsAccessTokens; private final Optional iconUrl; @@ -85,7 +83,6 @@ private ConnectionOptionsOkta( Optional clientSecret, Optional connectionSettings, Optional> domainAliases, - Optional dpopSigningAlg, OptionalNullable federatedConnectionsAccessTokens, Optional iconUrl, OptionalNullable> idTokenSignedResponseAlgs, @@ -111,7 +108,6 @@ private ConnectionOptionsOkta( this.clientSecret = clientSecret; this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; - this.dpopSigningAlg = dpopSigningAlg; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.iconUrl = iconUrl; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; @@ -169,12 +165,6 @@ public Optional> getDomainAliases() { return domainAliases; } - @JsonProperty("dpop_signing_alg") - @java.lang.Override - public Optional getDpopSigningAlg() { - return dpopSigningAlg; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("federated_connections_access_tokens") @java.lang.Override @@ -349,7 +339,6 @@ private boolean equalTo(ConnectionOptionsOkta other) { && clientSecret.equals(other.clientSecret) && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) - && dpopSigningAlg.equals(other.dpopSigningAlg) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && iconUrl.equals(other.iconUrl) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) @@ -379,7 +368,6 @@ public int hashCode() { this.clientSecret, this.connectionSettings, this.domainAliases, - this.dpopSigningAlg, this.federatedConnectionsAccessTokens, this.iconUrl, this.idTokenSignedResponseAlgs, @@ -442,10 +430,6 @@ public interface _FinalStage { _FinalStage domainAliases(List domainAliases); - _FinalStage dpopSigningAlg(Optional dpopSigningAlg); - - _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); - _FinalStage federatedConnectionsAccessTokens( @Nullable OptionalNullable federatedConnectionsAccessTokens); @@ -608,8 +592,6 @@ public static final class Builder implements ClientIdStage, _FinalStage { private OptionalNullable federatedConnectionsAccessTokens = OptionalNullable.absent(); - private Optional dpopSigningAlg = Optional.empty(); - private Optional> domainAliases = Optional.empty(); private Optional connectionSettings = Optional.empty(); @@ -633,7 +615,6 @@ public Builder from(ConnectionOptionsOkta other) { clientSecret(other.getClientSecret()); connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); - dpopSigningAlg(other.getDpopSigningAlg()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); iconUrl(other.getIconUrl()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); @@ -1033,19 +1014,6 @@ public _FinalStage federatedConnectionsAccessTokens( return this; } - @java.lang.Override - public _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { - this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) - public _FinalStage dpopSigningAlg(Optional dpopSigningAlg) { - this.dpopSigningAlg = dpopSigningAlg; - return this; - } - @java.lang.Override public _FinalStage domainAliases(List domainAliases) { this.domainAliases = Optional.ofNullable(domainAliases); @@ -1120,7 +1088,6 @@ public ConnectionOptionsOkta build() { clientSecret, connectionSettings, domainAliases, - dpopSigningAlg, federatedConnectionsAccessTokens, iconUrl, idTokenSignedResponseAlgs, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsRenren.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsRenren.java deleted file mode 100644 index aec9b8ff..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsRenren.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -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; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsRenren.Builder.class) -public final class ConnectionOptionsRenren implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsRenren( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsRenren && equalTo((ConnectionOptionsRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsRenren other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @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 clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsRenren other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsRenren build() { - return new ConnectionOptionsRenren( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - 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/ConnectionPropertiesOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java index 80b1a4f7..2a4b5ab1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java @@ -26,7 +26,7 @@ public final class ConnectionPropertiesOptions { private final OptionalNullable validation; - private final Optional> nonPersistentAttrs; + private final OptionalNullable> nonPersistentAttrs; private final Optional> precedence; @@ -38,6 +38,8 @@ public final class ConnectionPropertiesOptions { private final Optional importMode; + private final OptionalNullable>> configuration; + private final Optional customScripts; private final OptionalNullable authenticationMethods; @@ -85,12 +87,13 @@ public final class ConnectionPropertiesOptions { private ConnectionPropertiesOptions( OptionalNullable validation, - Optional> nonPersistentAttrs, + OptionalNullable> nonPersistentAttrs, Optional> precedence, Optional attributes, Optional enableScriptContext, Optional enabledDatabaseCustomization, Optional importMode, + OptionalNullable>> configuration, Optional customScripts, OptionalNullable authenticationMethods, OptionalNullable passkeyOptions, @@ -120,6 +123,7 @@ private ConnectionPropertiesOptions( this.enableScriptContext = enableScriptContext; this.enabledDatabaseCustomization = enabledDatabaseCustomization; this.importMode = importMode; + this.configuration = configuration; this.customScripts = customScripts; this.authenticationMethods = authenticationMethods; this.passkeyOptions = passkeyOptions; @@ -156,8 +160,12 @@ public OptionalNullable getValidation() { /** * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("non_persistent_attrs") - public Optional> getNonPersistentAttrs() { + public OptionalNullable> getNonPersistentAttrs() { + if (nonPersistentAttrs == null) { + return OptionalNullable.absent(); + } return nonPersistentAttrs; } @@ -198,6 +206,18 @@ public Optional getImportMode() { return importMode; } + /** + * @return Stores encrypted string only configurations for connections + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("configuration") + public OptionalNullable>> getConfiguration() { + if (configuration == null) { + return OptionalNullable.absent(); + } + return configuration; + } + @JsonProperty("customScripts") public Optional getCustomScripts() { return customScripts; @@ -349,6 +369,18 @@ private OptionalNullable _getValidation() { return validation; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("non_persistent_attrs") + private OptionalNullable> _getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("configuration") + private OptionalNullable>> _getConfiguration() { + return configuration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authentication_methods") private OptionalNullable _getAuthenticationMethods() { @@ -429,6 +461,7 @@ private boolean equalTo(ConnectionPropertiesOptions other) { && enableScriptContext.equals(other.enableScriptContext) && enabledDatabaseCustomization.equals(other.enabledDatabaseCustomization) && importMode.equals(other.importMode) + && configuration.equals(other.configuration) && customScripts.equals(other.customScripts) && authenticationMethods.equals(other.authenticationMethods) && passkeyOptions.equals(other.passkeyOptions) @@ -462,6 +495,7 @@ public int hashCode() { this.enableScriptContext, this.enabledDatabaseCustomization, this.importMode, + this.configuration, this.customScripts, this.authenticationMethods, this.passkeyOptions, @@ -498,7 +532,7 @@ public static Builder builder() { public static final class Builder { private OptionalNullable validation = OptionalNullable.absent(); - private Optional> nonPersistentAttrs = Optional.empty(); + private OptionalNullable> nonPersistentAttrs = OptionalNullable.absent(); private Optional> precedence = Optional.empty(); @@ -510,6 +544,8 @@ public static final class Builder { private Optional importMode = Optional.empty(); + private OptionalNullable>> configuration = OptionalNullable.absent(); + private Optional customScripts = Optional.empty(); private OptionalNullable authenticationMethods = OptionalNullable.absent(); @@ -569,6 +605,7 @@ public Builder from(ConnectionPropertiesOptions other) { enableScriptContext(other.getEnableScriptContext()); enabledDatabaseCustomization(other.getEnabledDatabaseCustomization()); importMode(other.getImportMode()); + configuration(other.getConfiguration()); customScripts(other.getCustomScripts()); authenticationMethods(other.getAuthenticationMethods()); passkeyOptions(other.getPasskeyOptions()); @@ -628,13 +665,33 @@ public Builder validation(com.auth0.client.mgmt.core.NullableAn array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

*/ @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + public Builder nonPersistentAttrs(@Nullable OptionalNullable> nonPersistentAttrs) { this.nonPersistentAttrs = nonPersistentAttrs; return this; } public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + this.nonPersistentAttrs = OptionalNullable.of(nonPersistentAttrs); + return this; + } + + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + if (nonPersistentAttrs.isPresent()) { + this.nonPersistentAttrs = OptionalNullable.of(nonPersistentAttrs.get()); + } else { + this.nonPersistentAttrs = OptionalNullable.absent(); + } + return this; + } + + public Builder nonPersistentAttrs(com.auth0.client.mgmt.core.Nullable> nonPersistentAttrs) { + if (nonPersistentAttrs.isNull()) { + this.nonPersistentAttrs = OptionalNullable.ofNull(); + } else if (nonPersistentAttrs.isEmpty()) { + this.nonPersistentAttrs = OptionalNullable.absent(); + } else { + this.nonPersistentAttrs = OptionalNullable.of(nonPersistentAttrs.get()); + } return this; } @@ -705,6 +762,41 @@ public Builder importMode(Boolean importMode) { return this; } + /** + *

Stores encrypted string only configurations for connections

+ */ + @JsonSetter(value = "configuration", nulls = Nulls.SKIP) + public Builder configuration(@Nullable OptionalNullable>> configuration) { + this.configuration = configuration; + return this; + } + + public Builder configuration(Map> configuration) { + this.configuration = OptionalNullable.of(configuration); + return this; + } + + public Builder configuration(Optional>> configuration) { + if (configuration.isPresent()) { + this.configuration = OptionalNullable.of(configuration.get()); + } else { + this.configuration = OptionalNullable.absent(); + } + return this; + } + + public Builder configuration( + com.auth0.client.mgmt.core.Nullable>> configuration) { + if (configuration.isNull()) { + this.configuration = OptionalNullable.ofNull(); + } else if (configuration.isEmpty()) { + this.configuration = OptionalNullable.absent(); + } else { + this.configuration = OptionalNullable.of(configuration.get()); + } + return this; + } + @JsonSetter(value = "customScripts", nulls = Nulls.SKIP) public Builder customScripts(Optional customScripts) { this.customScripts = customScripts; @@ -1173,6 +1265,7 @@ public ConnectionPropertiesOptions build() { enableScriptContext, enabledDatabaseCustomization, importMode, + configuration, customScripts, authenticationMethods, passkeyOptions, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicard.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicard.java deleted file mode 100644 index 7ae332fa..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicard.java +++ /dev/null @@ -1,457 +0,0 @@ -/** - * 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.auth0.client.mgmt.core.OptionalNullable; -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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentMiicard.Builder.class) -public final class ConnectionResponseContentMiicard - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentMiicardStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentMiicard( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentMiicardStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentMiicardStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentMiicard && equalTo((ConnectionResponseContentMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentMiicard other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentMiicardStrategy strategy); - - Builder from(ConnectionResponseContentMiicard other); - } - - public interface _FinalStage { - ConnectionResponseContentMiicard build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsMiicard options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentMiicardStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentMiicard other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentMiicardStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsMiicard options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentMiicard build() { - return new ConnectionResponseContentMiicard( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicardStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicardStrategy.java deleted file mode 100644 index 089da133..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicardStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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 ConnectionResponseContentMiicardStrategy { - public static final ConnectionResponseContentMiicardStrategy MIICARD = - new ConnectionResponseContentMiicardStrategy(Value.MIICARD, "miicard"); - - private final Value value; - - private final String string; - - ConnectionResponseContentMiicardStrategy(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 ConnectionResponseContentMiicardStrategy - && this.string.equals(((ConnectionResponseContentMiicardStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MIICARD: - return visitor.visitMiicard(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentMiicardStrategy valueOf(String value) { - switch (value) { - case "miicard": - return MIICARD; - default: - return new ConnectionResponseContentMiicardStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - MIICARD, - - UNKNOWN - } - - public interface Visitor { - T visitMiicard(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenren.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenren.java deleted file mode 100644 index 069748d7..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenren.java +++ /dev/null @@ -1,457 +0,0 @@ -/** - * 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.auth0.client.mgmt.core.OptionalNullable; -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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentRenren.Builder.class) -public final class ConnectionResponseContentRenren - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentRenrenStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentRenren( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentRenrenStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentRenrenStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentRenren && equalTo((ConnectionResponseContentRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentRenren other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentRenrenStrategy strategy); - - Builder from(ConnectionResponseContentRenren other); - } - - public interface _FinalStage { - ConnectionResponseContentRenren build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsRenren options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentRenrenStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentRenren other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentRenrenStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsRenren options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentRenren build() { - return new ConnectionResponseContentRenren( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenrenStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenrenStrategy.java deleted file mode 100644 index 619cf996..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenrenStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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 ConnectionResponseContentRenrenStrategy { - public static final ConnectionResponseContentRenrenStrategy RENREN = - new ConnectionResponseContentRenrenStrategy(Value.RENREN, "renren"); - - private final Value value; - - private final String string; - - ConnectionResponseContentRenrenStrategy(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 ConnectionResponseContentRenrenStrategy - && this.string.equals(((ConnectionResponseContentRenrenStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RENREN: - return visitor.visitRenren(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentRenrenStrategy valueOf(String value) { - switch (value) { - case "renren": - return RENREN; - default: - return new ConnectionResponseContentRenrenStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - RENREN, - - UNKNOWN - } - - public interface Visitor { - T visitRenren(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java index cd8b4ef4..e6e2dccd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateClientGrantRequestContent.Builder.class) public final class CreateClientGrantRequestContent { - private final String clientId; + private final Optional clientId; private final String audience; @@ -41,7 +41,7 @@ public final class CreateClientGrantRequestContent { private final Map additionalProperties; private CreateClientGrantRequestContent( - String clientId, + Optional clientId, String audience, Optional organizationUsage, Optional allowAnyOrganization, @@ -65,7 +65,7 @@ private CreateClientGrantRequestContent( * @return ID of the client. */ @JsonProperty("client_id") - public String getClientId() { + public Optional getClientId() { return clientId; } @@ -159,24 +159,17 @@ public String toString() { return ObjectMappers.stringify(this); } - public static ClientIdStage builder() { + public static AudienceStage builder() { return new Builder(); } - public interface ClientIdStage { - /** - *

ID of the client.

- */ - AudienceStage clientId(@NotNull String clientId); - - Builder from(CreateClientGrantRequestContent other); - } - public interface AudienceStage { /** *

The audience (API identifier) of this client grant

*/ _FinalStage audience(@NotNull String audience); + + Builder from(CreateClientGrantRequestContent other); } public interface _FinalStage { @@ -186,6 +179,13 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

ID of the client.

+ */ + _FinalStage clientId(Optional clientId); + + _FinalStage clientId(String clientId); + _FinalStage organizationUsage(Optional organizationUsage); _FinalStage organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage); @@ -224,9 +224,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientIdStage, AudienceStage, _FinalStage { - private String clientId; - + public static final class Builder implements AudienceStage, _FinalStage { private String audience; private Optional allowAllScopes = Optional.empty(); @@ -241,6 +239,8 @@ public static final class Builder implements ClientIdStage, AudienceStage, _Fina private Optional organizationUsage = Optional.empty(); + private Optional clientId = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -259,18 +259,6 @@ public Builder from(CreateClientGrantRequestContent other) { return this; } - /** - *

ID of the client.

- *

ID of the client.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("client_id") - public AudienceStage clientId(@NotNull String clientId) { - this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); - return this; - } - /** *

The audience (API identifier) of this client grant

*

The audience (API identifier) of this client grant

@@ -389,6 +377,26 @@ public _FinalStage organizationUsage(Optional return this; } + /** + *

ID of the client.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + /** + *

ID of the client.

+ */ + @java.lang.Override + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public _FinalStage clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + @java.lang.Override public CreateClientGrantRequestContent build() { return new CreateClientGrantRequestContent( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java index 5d630af0..b0855891 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java @@ -64,7 +64,7 @@ public final class CreateClientResponseContent { private final Optional jwtConfiguration; - private final Optional> signingKeys; + private final OptionalNullable> signingKeys; private final OptionalNullable encryptionKey; @@ -153,7 +153,7 @@ private CreateClientResponseContent( Optional oidcLogout, Optional> grantTypes, Optional jwtConfiguration, - Optional> signingKeys, + OptionalNullable> signingKeys, OptionalNullable encryptionKey, Optional sso, Optional ssoDisabled, @@ -395,8 +395,12 @@ public Optional getJwtConfiguration() { return jwtConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("signing_keys") - public Optional> getSigningKeys() { + public OptionalNullable> getSigningKeys() { + if (signingKeys == null) { + return OptionalNullable.absent(); + } return signingKeys; } @@ -640,6 +644,12 @@ private OptionalNullable _getSessionTransfer return sessionTransfer; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("signing_keys") + private OptionalNullable> _getSigningKeys() { + return signingKeys; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("encryption_key") private OptionalNullable _getEncryptionKey() { @@ -853,7 +863,7 @@ public static final class Builder { private Optional jwtConfiguration = Optional.empty(); - private Optional> signingKeys = Optional.empty(); + private OptionalNullable> signingKeys = OptionalNullable.absent(); private OptionalNullable encryptionKey = OptionalNullable.absent(); @@ -1272,13 +1282,33 @@ public Builder jwtConfiguration(ClientJwtConfiguration jwtConfiguration) { } @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { + public Builder signingKeys(@Nullable OptionalNullable> signingKeys) { this.signingKeys = signingKeys; return this; } public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); + this.signingKeys = OptionalNullable.of(signingKeys); + return this; + } + + public Builder signingKeys(Optional> signingKeys) { + if (signingKeys.isPresent()) { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } else { + this.signingKeys = OptionalNullable.absent(); + } + return this; + } + + public Builder signingKeys(com.auth0.client.mgmt.core.Nullable> signingKeys) { + if (signingKeys.isNull()) { + this.signingKeys = OptionalNullable.ofNull(); + } else if (signingKeys.isEmpty()) { + this.signingKeys = OptionalNullable.absent(); + } else { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicard.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicard.java deleted file mode 100644 index 8c10cc00..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicard.java +++ /dev/null @@ -1,325 +0,0 @@ -/** - * 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.auth0.client.mgmt.core.OptionalNullable; -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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentMiicard.Builder.class) -public final class CreateConnectionRequestContentMiicard implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentMiicardStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentMiicard( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentMiicardStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentMiicardStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentMiicard - && equalTo((CreateConnectionRequestContentMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentMiicard other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentMiicardStrategy strategy); - - Builder from(CreateConnectionRequestContentMiicard other); - } - - public interface _FinalStage { - CreateConnectionRequestContentMiicard build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsMiicard options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentMiicardStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentMiicard other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentMiicardStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsMiicard options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentMiicard build() { - return new CreateConnectionRequestContentMiicard( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicardStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicardStrategy.java deleted file mode 100644 index 606bb060..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicardStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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 CreateConnectionRequestContentMiicardStrategy { - public static final CreateConnectionRequestContentMiicardStrategy MIICARD = - new CreateConnectionRequestContentMiicardStrategy(Value.MIICARD, "miicard"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentMiicardStrategy(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 CreateConnectionRequestContentMiicardStrategy - && this.string.equals(((CreateConnectionRequestContentMiicardStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MIICARD: - return visitor.visitMiicard(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentMiicardStrategy valueOf(String value) { - switch (value) { - case "miicard": - return MIICARD; - default: - return new CreateConnectionRequestContentMiicardStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - MIICARD, - - UNKNOWN - } - - public interface Visitor { - T visitMiicard(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenren.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenren.java deleted file mode 100644 index a4a67945..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenren.java +++ /dev/null @@ -1,325 +0,0 @@ -/** - * 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.auth0.client.mgmt.core.OptionalNullable; -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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentRenren.Builder.class) -public final class CreateConnectionRequestContentRenren implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentRenrenStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentRenren( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentRenrenStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentRenrenStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentRenren - && equalTo((CreateConnectionRequestContentRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentRenren other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentRenrenStrategy strategy); - - Builder from(CreateConnectionRequestContentRenren other); - } - - public interface _FinalStage { - CreateConnectionRequestContentRenren build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsRenren options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentRenrenStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentRenren other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentRenrenStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsRenren options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentRenren build() { - return new CreateConnectionRequestContentRenren( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java index da8903a6..3b9e88b6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java @@ -25,14 +25,18 @@ public final class CreateDirectoryProvisioningRequestContent { private final Optional synchronizeAutomatically; + private final Optional synchronizeGroups; + private final Map additionalProperties; private CreateDirectoryProvisioningRequestContent( Optional> mapping, Optional synchronizeAutomatically, + Optional synchronizeGroups, Map additionalProperties) { this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; + this.synchronizeGroups = synchronizeGroups; this.additionalProperties = additionalProperties; } @@ -52,6 +56,11 @@ public Optional getSynchronizeAutomatically() { return synchronizeAutomatically; } + @JsonProperty("synchronize_groups") + public Optional getSynchronizeGroups() { + return synchronizeGroups; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -65,12 +74,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(CreateDirectoryProvisioningRequestContent other) { - return mapping.equals(other.mapping) && synchronizeAutomatically.equals(other.synchronizeAutomatically); + return mapping.equals(other.mapping) + && synchronizeAutomatically.equals(other.synchronizeAutomatically) + && synchronizeGroups.equals(other.synchronizeGroups); } @java.lang.Override public int hashCode() { - return Objects.hash(this.mapping, this.synchronizeAutomatically); + return Objects.hash(this.mapping, this.synchronizeAutomatically, this.synchronizeGroups); } @java.lang.Override @@ -88,6 +99,8 @@ public static final class Builder { private Optional synchronizeAutomatically = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -96,6 +109,7 @@ private Builder() {} public Builder from(CreateDirectoryProvisioningRequestContent other) { mapping(other.getMapping()); synchronizeAutomatically(other.getSynchronizeAutomatically()); + synchronizeGroups(other.getSynchronizeGroups()); return this; } @@ -127,9 +141,20 @@ public Builder synchronizeAutomatically(Boolean synchronizeAutomatically) { return this; } + @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) + public Builder synchronizeGroups(Optional synchronizeGroups) { + this.synchronizeGroups = synchronizeGroups; + return this; + } + + public Builder synchronizeGroups(String synchronizeGroups) { + this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); + return this; + } + public CreateDirectoryProvisioningRequestContent build() { return new CreateDirectoryProvisioningRequestContent( - mapping, synchronizeAutomatically, additionalProperties); + mapping, synchronizeAutomatically, synchronizeGroups, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java index ab6b6b7a..7a3abb5b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java @@ -34,6 +34,8 @@ public final class CreateDirectoryProvisioningResponseContent { private final boolean synchronizeAutomatically; + private final Optional synchronizeGroups; + private final OffsetDateTime createdAt; private final OffsetDateTime updatedAt; @@ -52,6 +54,7 @@ private CreateDirectoryProvisioningResponseContent( String strategy, List mapping, boolean synchronizeAutomatically, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -63,6 +66,7 @@ private CreateDirectoryProvisioningResponseContent( this.strategy = strategy; this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; + this.synchronizeGroups = synchronizeGroups; this.createdAt = createdAt; this.updatedAt = updatedAt; this.lastSynchronizationAt = lastSynchronizationAt; @@ -111,6 +115,11 @@ public boolean getSynchronizeAutomatically() { return synchronizeAutomatically; } + @JsonProperty("synchronize_groups") + public Optional getSynchronizeGroups() { + return synchronizeGroups; + } + /** * @return The timestamp at which the directory provisioning configuration was created */ @@ -169,6 +178,7 @@ private boolean equalTo(CreateDirectoryProvisioningResponseContent other) { && strategy.equals(other.strategy) && mapping.equals(other.mapping) && synchronizeAutomatically == other.synchronizeAutomatically + && synchronizeGroups.equals(other.synchronizeGroups) && createdAt.equals(other.createdAt) && updatedAt.equals(other.updatedAt) && lastSynchronizationAt.equals(other.lastSynchronizationAt) @@ -184,6 +194,7 @@ public int hashCode() { this.strategy, this.mapping, this.synchronizeAutomatically, + this.synchronizeGroups, this.createdAt, this.updatedAt, this.lastSynchronizationAt, @@ -260,6 +271,10 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); + _FinalStage synchronizeGroups(Optional synchronizeGroups); + + _FinalStage synchronizeGroups(String synchronizeGroups); + /** *

The timestamp at which the connection was last synchronized

*/ @@ -309,6 +324,8 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); + private List mapping = new ArrayList<>(); @JsonAnySetter @@ -323,6 +340,7 @@ public Builder from(CreateDirectoryProvisioningResponseContent other) { strategy(other.getStrategy()); mapping(other.getMapping()); synchronizeAutomatically(other.getSynchronizeAutomatically()); + synchronizeGroups(other.getSynchronizeGroups()); createdAt(other.getCreatedAt()); updatedAt(other.getUpdatedAt()); lastSynchronizationAt(other.getLastSynchronizationAt()); @@ -463,6 +481,19 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz return this; } + @java.lang.Override + public _FinalStage synchronizeGroups(String synchronizeGroups) { + this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); + return this; + } + + @java.lang.Override + @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + this.synchronizeGroups = synchronizeGroups; + return this; + } + /** *

The mapping between Auth0 and IDP user attributes

* @return Reference to {@code this} so that method calls can be chained together. @@ -506,6 +537,7 @@ public CreateDirectoryProvisioningResponseContent build() { strategy, mapping, synchronizeAutomatically, + synchronizeGroups, createdAt, updatedAt, lastSynchronizationAt, diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java index 7d7b51dd..dfc99154 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java @@ -49,7 +49,7 @@ public final class CreateResourceServerRequestContent { private final OptionalNullable consentPolicy; - private final Optional> authorizationDetails; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -70,7 +70,7 @@ private CreateResourceServerRequestContent( Optional enforcePolicies, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, - Optional> authorizationDetails, + OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, Map additionalProperties) { @@ -184,8 +184,12 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { + public OptionalNullable> getAuthorizationDetails() { + if (authorizationDetails == null) { + return OptionalNullable.absent(); + } return authorizationDetails; } @@ -215,6 +219,12 @@ private OptionalNullable _getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + private OptionalNullable> _getAuthorizationDetails() { + return authorizationDetails; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("proof_of_possession") private OptionalNullable _getProofOfPossession() { @@ -370,10 +380,14 @@ _FinalStage skipConsentForVerifiableFirstPartyClients( _FinalStage consentPolicy(com.auth0.client.mgmt.core.Nullable consentPolicy); - _FinalStage authorizationDetails(Optional> authorizationDetails); + _FinalStage authorizationDetails(@Nullable OptionalNullable> authorizationDetails); _FinalStage authorizationDetails(List authorizationDetails); + _FinalStage authorizationDetails(Optional> authorizationDetails); + + _FinalStage authorizationDetails(com.auth0.client.mgmt.core.Nullable> authorizationDetails); + _FinalStage proofOfPossession(@Nullable OptionalNullable proofOfPossession); _FinalStage proofOfPossession(ResourceServerProofOfPossession proofOfPossession); @@ -396,7 +410,7 @@ public static final class Builder implements IdentifierStage, _FinalStage { private OptionalNullable proofOfPossession = OptionalNullable.absent(); - private Optional> authorizationDetails = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable consentPolicy = OptionalNullable.absent(); @@ -508,15 +522,38 @@ public _FinalStage proofOfPossession( return this; } + @java.lang.Override + public _FinalStage authorizationDetails( + com.auth0.client.mgmt.core.Nullable> authorizationDetails) { + if (authorizationDetails.isNull()) { + this.authorizationDetails = OptionalNullable.ofNull(); + } else if (authorizationDetails.isEmpty()) { + this.authorizationDetails = OptionalNullable.absent(); + } else { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage authorizationDetails(Optional> authorizationDetails) { + if (authorizationDetails.isPresent()) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } else { + this.authorizationDetails = OptionalNullable.absent(); + } + return this; + } + @java.lang.Override public _FinalStage authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); + this.authorizationDetails = OptionalNullable.of(authorizationDetails); return this; } @java.lang.Override @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public _FinalStage authorizationDetails(Optional> authorizationDetails) { + public _FinalStage authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java index 2e2cdc70..4452b791 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java @@ -54,7 +54,7 @@ public final class CreateResourceServerResponseContent { private final OptionalNullable consentPolicy; - private final Optional> authorizationDetails; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -80,7 +80,7 @@ private CreateResourceServerResponseContent( Optional tokenDialect, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, - Optional> authorizationDetails, + OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, Optional clientId, @@ -223,8 +223,12 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { + public OptionalNullable> getAuthorizationDetails() { + if (authorizationDetails == null) { + return OptionalNullable.absent(); + } return authorizationDetails; } @@ -262,6 +266,12 @@ private OptionalNullable _getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + private OptionalNullable> _getAuthorizationDetails() { + return authorizationDetails; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("proof_of_possession") private OptionalNullable _getProofOfPossession() { @@ -367,7 +377,7 @@ public static final class Builder { private OptionalNullable consentPolicy = OptionalNullable.absent(); - private Optional> authorizationDetails = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -646,13 +656,33 @@ public Builder consentPolicy( } @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { + public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; return this; } public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); + this.authorizationDetails = OptionalNullable.of(authorizationDetails); + return this; + } + + public Builder authorizationDetails(Optional> authorizationDetails) { + if (authorizationDetails.isPresent()) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } else { + this.authorizationDetails = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationDetails(com.auth0.client.mgmt.core.Nullable> authorizationDetails) { + if (authorizationDetails.isNull()) { + this.authorizationDetails = OptionalNullable.ofNull(); + } else if (authorizationDetails.isEmpty()) { + this.authorizationDetails = OptionalNullable.absent(); + } else { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java index 7d8d587c..b1807dda 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java +++ b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java @@ -34,6 +34,8 @@ public final class DirectoryProvisioning { private final boolean synchronizeAutomatically; + private final Optional synchronizeGroups; + private final OffsetDateTime createdAt; private final OffsetDateTime updatedAt; @@ -52,6 +54,7 @@ private DirectoryProvisioning( String strategy, List mapping, boolean synchronizeAutomatically, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -63,6 +66,7 @@ private DirectoryProvisioning( this.strategy = strategy; this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; + this.synchronizeGroups = synchronizeGroups; this.createdAt = createdAt; this.updatedAt = updatedAt; this.lastSynchronizationAt = lastSynchronizationAt; @@ -111,6 +115,11 @@ public boolean getSynchronizeAutomatically() { return synchronizeAutomatically; } + @JsonProperty("synchronize_groups") + public Optional getSynchronizeGroups() { + return synchronizeGroups; + } + /** * @return The timestamp at which the directory provisioning configuration was created */ @@ -168,6 +177,7 @@ private boolean equalTo(DirectoryProvisioning other) { && strategy.equals(other.strategy) && mapping.equals(other.mapping) && synchronizeAutomatically == other.synchronizeAutomatically + && synchronizeGroups.equals(other.synchronizeGroups) && createdAt.equals(other.createdAt) && updatedAt.equals(other.updatedAt) && lastSynchronizationAt.equals(other.lastSynchronizationAt) @@ -183,6 +193,7 @@ public int hashCode() { this.strategy, this.mapping, this.synchronizeAutomatically, + this.synchronizeGroups, this.createdAt, this.updatedAt, this.lastSynchronizationAt, @@ -259,6 +270,10 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); + _FinalStage synchronizeGroups(Optional synchronizeGroups); + + _FinalStage synchronizeGroups(String synchronizeGroups); + /** *

The timestamp at which the connection was last synchronized

*/ @@ -308,6 +323,8 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); + private List mapping = new ArrayList<>(); @JsonAnySetter @@ -322,6 +339,7 @@ public Builder from(DirectoryProvisioning other) { strategy(other.getStrategy()); mapping(other.getMapping()); synchronizeAutomatically(other.getSynchronizeAutomatically()); + synchronizeGroups(other.getSynchronizeGroups()); createdAt(other.getCreatedAt()); updatedAt(other.getUpdatedAt()); lastSynchronizationAt(other.getLastSynchronizationAt()); @@ -462,6 +480,19 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz return this; } + @java.lang.Override + public _FinalStage synchronizeGroups(String synchronizeGroups) { + this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); + return this; + } + + @java.lang.Override + @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + this.synchronizeGroups = synchronizeGroups; + return this; + } + /** *

The mapping between Auth0 and IDP user attributes

* @return Reference to {@code this} so that method calls can be chained together. @@ -505,6 +536,7 @@ public DirectoryProvisioning build() { strategy, mapping, synchronizeAutomatically, + synchronizeGroups, createdAt, updatedAt, lastSynchronizationAt, diff --git a/src/main/java/com/auth0/client/mgmt/types/GetAculResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetAculResponseContent.java index ccda6950..e15a421f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetAculResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetAculResponseContent.java @@ -32,13 +32,13 @@ public final class GetAculResponseContent { private final Optional renderingMode; - private final Optional> contextConfiguration; + private final OptionalNullable> contextConfiguration; private final OptionalNullable defaultHeadTagsDisabled; private final OptionalNullable usePageTemplate; - private final Optional> headTags; + private final OptionalNullable> headTags; private final OptionalNullable filters; @@ -49,10 +49,10 @@ private GetAculResponseContent( Optional prompt, Optional screen, Optional renderingMode, - Optional> contextConfiguration, + OptionalNullable> contextConfiguration, OptionalNullable defaultHeadTagsDisabled, OptionalNullable usePageTemplate, - Optional> headTags, + OptionalNullable> headTags, OptionalNullable filters, Map additionalProperties) { this.tenant = tenant; @@ -99,8 +99,12 @@ public Optional getRenderingMode() { return renderingMode; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { + public OptionalNullable> getContextConfiguration() { + if (contextConfiguration == null) { + return OptionalNullable.absent(); + } return contextConfiguration; } @@ -131,8 +135,12 @@ public OptionalNullable getUsePageTemplate() { /** * @return An array of head tags */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("head_tags") - public Optional> getHeadTags() { + public OptionalNullable> getHeadTags() { + if (headTags == null) { + return OptionalNullable.absent(); + } return headTags; } @@ -145,6 +153,12 @@ public OptionalNullable getFilters() { return filters; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("context_configuration") + private OptionalNullable> _getContextConfiguration() { + return contextConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("default_head_tags_disabled") private OptionalNullable _getDefaultHeadTagsDisabled() { @@ -157,6 +171,12 @@ private OptionalNullable _getUsePageTemplate() { return usePageTemplate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("head_tags") + private OptionalNullable> _getHeadTags() { + return headTags; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("filters") private OptionalNullable _getFilters() { @@ -219,13 +239,13 @@ public static final class Builder { private Optional renderingMode = Optional.empty(); - private Optional> contextConfiguration = Optional.empty(); + private OptionalNullable> contextConfiguration = OptionalNullable.absent(); private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); private OptionalNullable usePageTemplate = OptionalNullable.absent(); - private Optional> headTags = Optional.empty(); + private OptionalNullable> headTags = OptionalNullable.absent(); private OptionalNullable filters = OptionalNullable.absent(); @@ -304,13 +324,35 @@ public Builder renderingMode(AculRenderingModeEnum renderingMode) { } @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { + public Builder contextConfiguration( + @Nullable OptionalNullable> contextConfiguration) { this.contextConfiguration = contextConfiguration; return this; } public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); + this.contextConfiguration = OptionalNullable.of(contextConfiguration); + return this; + } + + public Builder contextConfiguration(Optional> contextConfiguration) { + if (contextConfiguration.isPresent()) { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } else { + this.contextConfiguration = OptionalNullable.absent(); + } + return this; + } + + public Builder contextConfiguration( + com.auth0.client.mgmt.core.Nullable> contextConfiguration) { + if (contextConfiguration.isNull()) { + this.contextConfiguration = OptionalNullable.ofNull(); + } else if (contextConfiguration.isEmpty()) { + this.contextConfiguration = OptionalNullable.absent(); + } else { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } return this; } @@ -386,13 +428,33 @@ public Builder usePageTemplate(com.auth0.client.mgmt.core.Nullable useP *

An array of head tags

*/ @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { + public Builder headTags(@Nullable OptionalNullable> headTags) { this.headTags = headTags; return this; } public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); + this.headTags = OptionalNullable.of(headTags); + return this; + } + + public Builder headTags(Optional> headTags) { + if (headTags.isPresent()) { + this.headTags = OptionalNullable.of(headTags.get()); + } else { + this.headTags = OptionalNullable.absent(); + } + return this; + } + + public Builder headTags(com.auth0.client.mgmt.core.Nullable> headTags) { + if (headTags.isNull()) { + this.headTags = OptionalNullable.ofNull(); + } else if (headTags.isEmpty()) { + this.headTags = OptionalNullable.absent(); + } else { + this.headTags = OptionalNullable.of(headTags.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java index 8e85b787..4819c188 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java @@ -64,7 +64,7 @@ public final class GetClientResponseContent { private final Optional jwtConfiguration; - private final Optional> signingKeys; + private final OptionalNullable> signingKeys; private final OptionalNullable encryptionKey; @@ -153,7 +153,7 @@ private GetClientResponseContent( Optional oidcLogout, Optional> grantTypes, Optional jwtConfiguration, - Optional> signingKeys, + OptionalNullable> signingKeys, OptionalNullable encryptionKey, Optional sso, Optional ssoDisabled, @@ -395,8 +395,12 @@ public Optional getJwtConfiguration() { return jwtConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("signing_keys") - public Optional> getSigningKeys() { + public OptionalNullable> getSigningKeys() { + if (signingKeys == null) { + return OptionalNullable.absent(); + } return signingKeys; } @@ -640,6 +644,12 @@ private OptionalNullable _getSessionTransfer return sessionTransfer; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("signing_keys") + private OptionalNullable> _getSigningKeys() { + return signingKeys; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("encryption_key") private OptionalNullable _getEncryptionKey() { @@ -853,7 +863,7 @@ public static final class Builder { private Optional jwtConfiguration = Optional.empty(); - private Optional> signingKeys = Optional.empty(); + private OptionalNullable> signingKeys = OptionalNullable.absent(); private OptionalNullable encryptionKey = OptionalNullable.absent(); @@ -1272,13 +1282,33 @@ public Builder jwtConfiguration(ClientJwtConfiguration jwtConfiguration) { } @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { + public Builder signingKeys(@Nullable OptionalNullable> signingKeys) { this.signingKeys = signingKeys; return this; } public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); + this.signingKeys = OptionalNullable.of(signingKeys); + return this; + } + + public Builder signingKeys(Optional> signingKeys) { + if (signingKeys.isPresent()) { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } else { + this.signingKeys = OptionalNullable.absent(); + } + return this; + } + + public Builder signingKeys(com.auth0.client.mgmt.core.Nullable> signingKeys) { + if (signingKeys.isNull()) { + this.signingKeys = OptionalNullable.ofNull(); + } else if (signingKeys.isEmpty()) { + this.signingKeys = OptionalNullable.absent(); + } else { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDefaultCanonicalDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCanonicalDomainResponseContent.java new file mode 100644 index 00000000..007d88de --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCanonicalDomainResponseContent.java @@ -0,0 +1,130 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetDefaultCanonicalDomainResponseContent.Builder.class) +public final class GetDefaultCanonicalDomainResponseContent { + private final String domain; + + private final Map additionalProperties; + + private GetDefaultCanonicalDomainResponseContent(String domain, Map additionalProperties) { + this.domain = domain; + this.additionalProperties = additionalProperties; + } + + /** + * @return Domain name. + */ + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetDefaultCanonicalDomainResponseContent + && equalTo((GetDefaultCanonicalDomainResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetDefaultCanonicalDomainResponseContent other) { + return domain.equals(other.domain); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.domain); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DomainStage builder() { + return new Builder(); + } + + public interface DomainStage { + /** + *

Domain name.

+ */ + _FinalStage domain(@NotNull String domain); + + Builder from(GetDefaultCanonicalDomainResponseContent other); + } + + public interface _FinalStage { + GetDefaultCanonicalDomainResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements DomainStage, _FinalStage { + private String domain; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetDefaultCanonicalDomainResponseContent other) { + domain(other.getDomain()); + return this; + } + + /** + *

Domain name.

+ *

Domain name.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("domain") + public _FinalStage domain(@NotNull String domain) { + this.domain = Objects.requireNonNull(domain, "domain must not be null"); + return this; + } + + @java.lang.Override + public GetDefaultCanonicalDomainResponseContent build() { + return new GetDefaultCanonicalDomainResponseContent(domain, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDefaultCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCustomDomainResponseContent.java new file mode 100644 index 00000000..9b94899c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCustomDomainResponseContent.java @@ -0,0 +1,632 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetDefaultCustomDomainResponseContent.Builder.class) +public final class GetDefaultCustomDomainResponseContent { + private final String customDomainId; + + private final String domain; + + private final boolean primary; + + private final Optional isDefault; + + private final CustomDomainStatusFilterEnum status; + + private final CustomDomainTypeEnum type; + + private final Optional originDomainName; + + private final Optional verification; + + private final OptionalNullable customClientIpHeader; + + private final Optional tlsPolicy; + + private final Optional>> domainMetadata; + + private final Optional certificate; + + private final Optional relyingPartyIdentifier; + + private final Map additionalProperties; + + private GetDefaultCustomDomainResponseContent( + String customDomainId, + String domain, + boolean primary, + Optional isDefault, + CustomDomainStatusFilterEnum status, + CustomDomainTypeEnum type, + Optional originDomainName, + Optional verification, + OptionalNullable customClientIpHeader, + Optional tlsPolicy, + Optional>> domainMetadata, + Optional certificate, + Optional relyingPartyIdentifier, + Map additionalProperties) { + this.customDomainId = customDomainId; + this.domain = domain; + this.primary = primary; + this.isDefault = isDefault; + this.status = status; + this.type = type; + this.originDomainName = originDomainName; + this.verification = verification; + this.customClientIpHeader = customClientIpHeader; + this.tlsPolicy = tlsPolicy; + this.domainMetadata = domainMetadata; + this.certificate = certificate; + this.relyingPartyIdentifier = relyingPartyIdentifier; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the custom domain. + */ + @JsonProperty("custom_domain_id") + public String getCustomDomainId() { + return customDomainId; + } + + /** + * @return Domain name. + */ + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + /** + * @return Whether this is a primary domain (true) or not (false). + */ + @JsonProperty("primary") + public boolean getPrimary() { + return primary; + } + + /** + * @return Whether this is the default custom domain (true) or not (false). + */ + @JsonProperty("is_default") + public Optional getIsDefault() { + return isDefault; + } + + @JsonProperty("status") + public CustomDomainStatusFilterEnum getStatus() { + return status; + } + + @JsonProperty("type") + public CustomDomainTypeEnum getType() { + return type; + } + + /** + * @return Intermediate address. + */ + @JsonProperty("origin_domain_name") + public Optional getOriginDomainName() { + return originDomainName; + } + + @JsonProperty("verification") + public Optional getVerification() { + return verification; + } + + /** + * @return The HTTP header to fetch the client's IP address + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("custom_client_ip_header") + public OptionalNullable getCustomClientIpHeader() { + if (customClientIpHeader == null) { + return OptionalNullable.absent(); + } + return customClientIpHeader; + } + + /** + * @return The TLS version policy + */ + @JsonProperty("tls_policy") + public Optional getTlsPolicy() { + return tlsPolicy; + } + + @JsonProperty("domain_metadata") + public Optional>> getDomainMetadata() { + return domainMetadata; + } + + @JsonProperty("certificate") + public Optional getCertificate() { + return certificate; + } + + /** + * @return Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. + */ + @JsonProperty("relying_party_identifier") + public Optional getRelyingPartyIdentifier() { + return relyingPartyIdentifier; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("custom_client_ip_header") + private OptionalNullable _getCustomClientIpHeader() { + return customClientIpHeader; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetDefaultCustomDomainResponseContent + && equalTo((GetDefaultCustomDomainResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetDefaultCustomDomainResponseContent other) { + return customDomainId.equals(other.customDomainId) + && domain.equals(other.domain) + && primary == other.primary + && isDefault.equals(other.isDefault) + && status.equals(other.status) + && type.equals(other.type) + && originDomainName.equals(other.originDomainName) + && verification.equals(other.verification) + && customClientIpHeader.equals(other.customClientIpHeader) + && tlsPolicy.equals(other.tlsPolicy) + && domainMetadata.equals(other.domainMetadata) + && certificate.equals(other.certificate) + && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.customDomainId, + this.domain, + this.primary, + this.isDefault, + this.status, + this.type, + this.originDomainName, + this.verification, + this.customClientIpHeader, + this.tlsPolicy, + this.domainMetadata, + this.certificate, + this.relyingPartyIdentifier); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static CustomDomainIdStage builder() { + return new Builder(); + } + + public interface CustomDomainIdStage { + /** + *

ID of the custom domain.

+ */ + DomainStage customDomainId(@NotNull String customDomainId); + + Builder from(GetDefaultCustomDomainResponseContent other); + } + + public interface DomainStage { + /** + *

Domain name.

+ */ + PrimaryStage domain(@NotNull String domain); + } + + public interface PrimaryStage { + /** + *

Whether this is a primary domain (true) or not (false).

+ */ + StatusStage primary(boolean primary); + } + + public interface StatusStage { + TypeStage status(@NotNull CustomDomainStatusFilterEnum status); + } + + public interface TypeStage { + _FinalStage type(@NotNull CustomDomainTypeEnum type); + } + + public interface _FinalStage { + GetDefaultCustomDomainResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Whether this is the default custom domain (true) or not (false).

+ */ + _FinalStage isDefault(Optional isDefault); + + _FinalStage isDefault(Boolean isDefault); + + /** + *

Intermediate address.

+ */ + _FinalStage originDomainName(Optional originDomainName); + + _FinalStage originDomainName(String originDomainName); + + _FinalStage verification(Optional verification); + + _FinalStage verification(DomainVerification verification); + + /** + *

The HTTP header to fetch the client's IP address

+ */ + _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader); + + _FinalStage customClientIpHeader(String customClientIpHeader); + + _FinalStage customClientIpHeader(Optional customClientIpHeader); + + _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader); + + /** + *

The TLS version policy

+ */ + _FinalStage tlsPolicy(Optional tlsPolicy); + + _FinalStage tlsPolicy(String tlsPolicy); + + _FinalStage domainMetadata(Optional>> domainMetadata); + + _FinalStage domainMetadata(Map> domainMetadata); + + _FinalStage certificate(Optional certificate); + + _FinalStage certificate(DomainCertificate certificate); + + /** + *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

+ */ + _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); + + _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements CustomDomainIdStage, DomainStage, PrimaryStage, StatusStage, TypeStage, _FinalStage { + private String customDomainId; + + private String domain; + + private boolean primary; + + private CustomDomainStatusFilterEnum status; + + private CustomDomainTypeEnum type; + + private Optional relyingPartyIdentifier = Optional.empty(); + + private Optional certificate = Optional.empty(); + + private Optional>> domainMetadata = Optional.empty(); + + private Optional tlsPolicy = Optional.empty(); + + private OptionalNullable customClientIpHeader = OptionalNullable.absent(); + + private Optional verification = Optional.empty(); + + private Optional originDomainName = Optional.empty(); + + private Optional isDefault = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetDefaultCustomDomainResponseContent other) { + customDomainId(other.getCustomDomainId()); + domain(other.getDomain()); + primary(other.getPrimary()); + isDefault(other.getIsDefault()); + status(other.getStatus()); + type(other.getType()); + originDomainName(other.getOriginDomainName()); + verification(other.getVerification()); + customClientIpHeader(other.getCustomClientIpHeader()); + tlsPolicy(other.getTlsPolicy()); + domainMetadata(other.getDomainMetadata()); + certificate(other.getCertificate()); + relyingPartyIdentifier(other.getRelyingPartyIdentifier()); + return this; + } + + /** + *

ID of the custom domain.

+ *

ID of the custom domain.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("custom_domain_id") + public DomainStage customDomainId(@NotNull String customDomainId) { + this.customDomainId = Objects.requireNonNull(customDomainId, "customDomainId must not be null"); + return this; + } + + /** + *

Domain name.

+ *

Domain name.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("domain") + public PrimaryStage domain(@NotNull String domain) { + this.domain = Objects.requireNonNull(domain, "domain must not be null"); + return this; + } + + /** + *

Whether this is a primary domain (true) or not (false).

+ *

Whether this is a primary domain (true) or not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("primary") + public StatusStage primary(boolean primary) { + this.primary = primary; + return this; + } + + @java.lang.Override + @JsonSetter("status") + public TypeStage status(@NotNull CustomDomainStatusFilterEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull CustomDomainTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { + this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); + return this; + } + + /** + *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

+ */ + @java.lang.Override + @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) + public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { + this.relyingPartyIdentifier = relyingPartyIdentifier; + return this; + } + + @java.lang.Override + public _FinalStage certificate(DomainCertificate certificate) { + this.certificate = Optional.ofNullable(certificate); + return this; + } + + @java.lang.Override + @JsonSetter(value = "certificate", nulls = Nulls.SKIP) + public _FinalStage certificate(Optional certificate) { + this.certificate = certificate; + return this; + } + + @java.lang.Override + public _FinalStage domainMetadata(Map> domainMetadata) { + this.domainMetadata = Optional.ofNullable(domainMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) + public _FinalStage domainMetadata(Optional>> domainMetadata) { + this.domainMetadata = domainMetadata; + return this; + } + + /** + *

The TLS version policy

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tlsPolicy(String tlsPolicy) { + this.tlsPolicy = Optional.ofNullable(tlsPolicy); + return this; + } + + /** + *

The TLS version policy

+ */ + @java.lang.Override + @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) + public _FinalStage tlsPolicy(Optional tlsPolicy) { + this.tlsPolicy = tlsPolicy; + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader) { + if (customClientIpHeader.isNull()) { + this.customClientIpHeader = OptionalNullable.ofNull(); + } else if (customClientIpHeader.isEmpty()) { + this.customClientIpHeader = OptionalNullable.absent(); + } else { + this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); + } + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage customClientIpHeader(Optional customClientIpHeader) { + if (customClientIpHeader.isPresent()) { + this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); + } else { + this.customClientIpHeader = OptionalNullable.absent(); + } + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage customClientIpHeader(String customClientIpHeader) { + this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ */ + @java.lang.Override + @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) + public _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader) { + this.customClientIpHeader = customClientIpHeader; + return this; + } + + @java.lang.Override + public _FinalStage verification(DomainVerification verification) { + this.verification = Optional.ofNullable(verification); + return this; + } + + @java.lang.Override + @JsonSetter(value = "verification", nulls = Nulls.SKIP) + public _FinalStage verification(Optional verification) { + this.verification = verification; + return this; + } + + /** + *

Intermediate address.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage originDomainName(String originDomainName) { + this.originDomainName = Optional.ofNullable(originDomainName); + return this; + } + + /** + *

Intermediate address.

+ */ + @java.lang.Override + @JsonSetter(value = "origin_domain_name", nulls = Nulls.SKIP) + public _FinalStage originDomainName(Optional originDomainName) { + this.originDomainName = originDomainName; + return this; + } + + /** + *

Whether this is the default custom domain (true) or not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDefault(Boolean isDefault) { + this.isDefault = Optional.ofNullable(isDefault); + return this; + } + + /** + *

Whether this is the default custom domain (true) or not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "is_default", nulls = Nulls.SKIP) + public _FinalStage isDefault(Optional isDefault) { + this.isDefault = isDefault; + return this; + } + + @java.lang.Override + public GetDefaultCustomDomainResponseContent build() { + return new GetDefaultCustomDomainResponseContent( + customDomainId, + domain, + primary, + isDefault, + status, + type, + originDomainName, + verification, + customClientIpHeader, + tlsPolicy, + domainMetadata, + certificate, + relyingPartyIdentifier, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDefaultDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDefaultDomainResponseContent.java new file mode 100644 index 00000000..b6d09d98 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetDefaultDomainResponseContent.java @@ -0,0 +1,97 @@ +/** + * 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.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = GetDefaultDomainResponseContent.Deserializer.class) +public final class GetDefaultDomainResponseContent { + private final Object value; + + private final int type; + + private GetDefaultDomainResponseContent(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((GetDefaultCustomDomainResponseContent) this.value); + } else if (this.type == 1) { + return visitor.visit((GetDefaultCanonicalDomainResponseContent) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetDefaultDomainResponseContent && equalTo((GetDefaultDomainResponseContent) other); + } + + private boolean equalTo(GetDefaultDomainResponseContent other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static GetDefaultDomainResponseContent of(GetDefaultCustomDomainResponseContent value) { + return new GetDefaultDomainResponseContent(value, 0); + } + + public static GetDefaultDomainResponseContent of(GetDefaultCanonicalDomainResponseContent value) { + return new GetDefaultDomainResponseContent(value, 1); + } + + public interface Visitor { + T visit(GetDefaultCustomDomainResponseContent value); + + T visit(GetDefaultCanonicalDomainResponseContent value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(GetDefaultDomainResponseContent.class); + } + + @java.lang.Override + public GetDefaultDomainResponseContent deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, GetDefaultCustomDomainResponseContent.class)); + } catch (RuntimeException e) { + } + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, GetDefaultCanonicalDomainResponseContent.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java index ab9e4346..1947b1e6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java @@ -34,6 +34,8 @@ public final class GetDirectoryProvisioningResponseContent { private final boolean synchronizeAutomatically; + private final Optional synchronizeGroups; + private final OffsetDateTime createdAt; private final OffsetDateTime updatedAt; @@ -52,6 +54,7 @@ private GetDirectoryProvisioningResponseContent( String strategy, List mapping, boolean synchronizeAutomatically, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -63,6 +66,7 @@ private GetDirectoryProvisioningResponseContent( this.strategy = strategy; this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; + this.synchronizeGroups = synchronizeGroups; this.createdAt = createdAt; this.updatedAt = updatedAt; this.lastSynchronizationAt = lastSynchronizationAt; @@ -111,6 +115,11 @@ public boolean getSynchronizeAutomatically() { return synchronizeAutomatically; } + @JsonProperty("synchronize_groups") + public Optional getSynchronizeGroups() { + return synchronizeGroups; + } + /** * @return The timestamp at which the directory provisioning configuration was created */ @@ -169,6 +178,7 @@ private boolean equalTo(GetDirectoryProvisioningResponseContent other) { && strategy.equals(other.strategy) && mapping.equals(other.mapping) && synchronizeAutomatically == other.synchronizeAutomatically + && synchronizeGroups.equals(other.synchronizeGroups) && createdAt.equals(other.createdAt) && updatedAt.equals(other.updatedAt) && lastSynchronizationAt.equals(other.lastSynchronizationAt) @@ -184,6 +194,7 @@ public int hashCode() { this.strategy, this.mapping, this.synchronizeAutomatically, + this.synchronizeGroups, this.createdAt, this.updatedAt, this.lastSynchronizationAt, @@ -260,6 +271,10 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); + _FinalStage synchronizeGroups(Optional synchronizeGroups); + + _FinalStage synchronizeGroups(String synchronizeGroups); + /** *

The timestamp at which the connection was last synchronized

*/ @@ -309,6 +324,8 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); + private List mapping = new ArrayList<>(); @JsonAnySetter @@ -323,6 +340,7 @@ public Builder from(GetDirectoryProvisioningResponseContent other) { strategy(other.getStrategy()); mapping(other.getMapping()); synchronizeAutomatically(other.getSynchronizeAutomatically()); + synchronizeGroups(other.getSynchronizeGroups()); createdAt(other.getCreatedAt()); updatedAt(other.getUpdatedAt()); lastSynchronizationAt(other.getLastSynchronizationAt()); @@ -463,6 +481,19 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz return this; } + @java.lang.Override + public _FinalStage synchronizeGroups(String synchronizeGroups) { + this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); + return this; + } + + @java.lang.Override + @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + this.synchronizeGroups = synchronizeGroups; + return this; + } + /** *

The mapping between Auth0 and IDP user attributes

* @return Reference to {@code this} so that method calls can be chained together. @@ -506,6 +537,7 @@ public GetDirectoryProvisioningResponseContent build() { strategy, mapping, synchronizeAutomatically, + synchronizeGroups, createdAt, updatedAt, lastSynchronizationAt, diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java index 0085556d..a3a53d51 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java @@ -3,9 +3,7 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -20,7 +18,6 @@ import java.util.Objects; import java.util.Optional; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GetGroupResponseContent.Builder.class) @@ -33,12 +30,8 @@ public final class GetGroupResponseContent { private final Optional connectionId; - private final OptionalNullable organizationId; - private final String tenantName; - private final OptionalNullable description; - private final OffsetDateTime createdAt; private final OffsetDateTime updatedAt; @@ -50,9 +43,7 @@ private GetGroupResponseContent( String name, Optional externalId, Optional connectionId, - OptionalNullable organizationId, String tenantName, - OptionalNullable description, OffsetDateTime createdAt, OffsetDateTime updatedAt, Map additionalProperties) { @@ -60,9 +51,7 @@ private GetGroupResponseContent( this.name = name; this.externalId = externalId; this.connectionId = connectionId; - this.organizationId = organizationId; this.tenantName = tenantName; - this.description = description; this.createdAt = createdAt; this.updatedAt = updatedAt; this.additionalProperties = additionalProperties; @@ -77,7 +66,7 @@ public String getId() { } /** - * @return Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters. + * @return Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters. */ @JsonProperty("name") public String getName() { @@ -100,18 +89,6 @@ public Optional getConnectionId() { return connectionId; } - /** - * @return Identifier for the organization this group belongs to (if an organization group). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - public OptionalNullable getOrganizationId() { - if (organizationId == null) { - return OptionalNullable.absent(); - } - return organizationId; - } - /** * @return Identifier for the tenant this group belongs to. */ @@ -120,15 +97,6 @@ public String getTenantName() { return tenantName; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - /** * @return Timestamp of when the group was created. */ @@ -145,18 +113,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - private OptionalNullable _getOrganizationId() { - return organizationId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - private OptionalNullable _getDescription() { - return description; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -173,9 +129,7 @@ private boolean equalTo(GetGroupResponseContent other) { && name.equals(other.name) && externalId.equals(other.externalId) && connectionId.equals(other.connectionId) - && organizationId.equals(other.organizationId) && tenantName.equals(other.tenantName) - && description.equals(other.description) && createdAt.equals(other.createdAt) && updatedAt.equals(other.updatedAt); } @@ -187,9 +141,7 @@ public int hashCode() { this.name, this.externalId, this.connectionId, - this.organizationId, this.tenantName, - this.description, this.createdAt, this.updatedAt); } @@ -214,7 +166,7 @@ public interface IdStage { public interface NameStage { /** - *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

+ *

Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

*/ TenantNameStage name(@NotNull String name); } @@ -260,25 +212,6 @@ public interface _FinalStage { _FinalStage connectionId(Optional connectionId); _FinalStage connectionId(String connectionId); - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- */ - _FinalStage organizationId(@Nullable OptionalNullable organizationId); - - _FinalStage organizationId(String organizationId); - - _FinalStage organizationId(Optional organizationId); - - _FinalStage organizationId(com.auth0.client.mgmt.core.Nullable organizationId); - - _FinalStage description(@Nullable OptionalNullable description); - - _FinalStage description(String description); - - _FinalStage description(Optional description); - - _FinalStage description(com.auth0.client.mgmt.core.Nullable description); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -294,10 +227,6 @@ public static final class Builder private OffsetDateTime updatedAt; - private OptionalNullable description = OptionalNullable.absent(); - - private OptionalNullable organizationId = OptionalNullable.absent(); - private Optional connectionId = Optional.empty(); private Optional externalId = Optional.empty(); @@ -313,9 +242,7 @@ public Builder from(GetGroupResponseContent other) { name(other.getName()); externalId(other.getExternalId()); connectionId(other.getConnectionId()); - organizationId(other.getOrganizationId()); tenantName(other.getTenantName()); - description(other.getDescription()); createdAt(other.getCreatedAt()); updatedAt(other.getUpdatedAt()); return this; @@ -334,8 +261,8 @@ public NameStage id(@NotNull String id) { } /** - *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

- *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

+ *

Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

+ *

Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -381,91 +308,6 @@ public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { return this; } - @java.lang.Override - public _FinalStage description(com.auth0.client.mgmt.core.Nullable description) { - if (description.isNull()) { - this.description = OptionalNullable.ofNull(); - } else if (description.isEmpty()) { - this.description = OptionalNullable.absent(); - } else { - this.description = OptionalNullable.of(description.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage description(Optional description) { - if (description.isPresent()) { - this.description = OptionalNullable.of(description.get()); - } else { - this.description = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage description(String description) { - this.description = OptionalNullable.of(description); - return this; - } - - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(@Nullable OptionalNullable description) { - this.description = description; - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationId(com.auth0.client.mgmt.core.Nullable organizationId) { - if (organizationId.isNull()) { - this.organizationId = OptionalNullable.ofNull(); - } else if (organizationId.isEmpty()) { - this.organizationId = OptionalNullable.absent(); - } else { - this.organizationId = OptionalNullable.of(organizationId.get()); - } - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationId(Optional organizationId) { - if (organizationId.isPresent()) { - this.organizationId = OptionalNullable.of(organizationId.get()); - } else { - this.organizationId = OptionalNullable.absent(); - } - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationId(String organizationId) { - this.organizationId = OptionalNullable.of(organizationId); - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- */ - @java.lang.Override - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public _FinalStage organizationId(@Nullable OptionalNullable organizationId) { - this.organizationId = organizationId; - return this; - } - /** *

Identifier for the connection this group belongs to (if a connection group).

* @return Reference to {@code this} so that method calls can be chained together. @@ -509,16 +351,7 @@ public _FinalStage externalId(Optional externalId) { @java.lang.Override public GetGroupResponseContent build() { return new GetGroupResponseContent( - id, - name, - externalId, - connectionId, - organizationId, - tenantName, - description, - createdAt, - updatedAt, - additionalProperties); + id, name, externalId, connectionId, tenantName, createdAt, updatedAt, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java index 0b61e9a9..ff3b6f2e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java @@ -54,7 +54,7 @@ public final class GetResourceServerResponseContent { private final OptionalNullable consentPolicy; - private final Optional> authorizationDetails; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -80,7 +80,7 @@ private GetResourceServerResponseContent( Optional tokenDialect, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, - Optional> authorizationDetails, + OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, Optional clientId, @@ -223,8 +223,12 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { + public OptionalNullable> getAuthorizationDetails() { + if (authorizationDetails == null) { + return OptionalNullable.absent(); + } return authorizationDetails; } @@ -262,6 +266,12 @@ private OptionalNullable _getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + private OptionalNullable> _getAuthorizationDetails() { + return authorizationDetails; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("proof_of_possession") private OptionalNullable _getProofOfPossession() { @@ -366,7 +376,7 @@ public static final class Builder { private OptionalNullable consentPolicy = OptionalNullable.absent(); - private Optional> authorizationDetails = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -645,13 +655,33 @@ public Builder consentPolicy( } @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { + public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; return this; } public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); + this.authorizationDetails = OptionalNullable.of(authorizationDetails); + return this; + } + + public Builder authorizationDetails(Optional> authorizationDetails) { + if (authorizationDetails.isPresent()) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } else { + this.authorizationDetails = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationDetails(com.auth0.client.mgmt.core.Nullable> authorizationDetails) { + if (authorizationDetails.isNull()) { + this.authorizationDetails = OptionalNullable.ofNull(); + } else if (authorizationDetails.isEmpty()) { + this.authorizationDetails = OptionalNullable.absent(); + } else { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java index da70b1f8..f606c1dc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java @@ -78,7 +78,7 @@ public final class GetTenantSettingsResponseContent { private final Optional customizeMfaInPostloginAction; - private final Optional> acrValuesSupported; + private final OptionalNullable> acrValuesSupported; private final OptionalNullable mtls; @@ -124,7 +124,7 @@ private GetTenantSettingsResponseContent( Optional oidcLogout, Optional allowOrganizationNameInAuthenticationApi, Optional customizeMfaInPostloginAction, - Optional> acrValuesSupported, + OptionalNullable> acrValuesSupported, OptionalNullable mtls, Optional pushedAuthorizationRequestsSupported, OptionalNullable authorizationResponseIssParameterSupported, @@ -391,8 +391,12 @@ public Optional getCustomizeMfaInPostloginAction() { /** * @return Supported ACR values */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("acr_values_supported") - public Optional> getAcrValuesSupported() { + public OptionalNullable> getAcrValuesSupported() { + if (acrValuesSupported == null) { + return OptionalNullable.absent(); + } return acrValuesSupported; } @@ -502,6 +506,12 @@ private OptionalNullable _getSessions() { return sessions; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("acr_values_supported") + private OptionalNullable> _getAcrValuesSupported() { + return acrValuesSupported; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("mtls") private OptionalNullable _getMtls() { @@ -675,7 +685,7 @@ public static final class Builder { private Optional customizeMfaInPostloginAction = Optional.empty(); - private Optional> acrValuesSupported = Optional.empty(); + private OptionalNullable> acrValuesSupported = OptionalNullable.absent(); private OptionalNullable mtls = OptionalNullable.absent(); @@ -1233,13 +1243,33 @@ public Builder customizeMfaInPostloginAction(Boolean customizeMfaInPostloginActi *

Supported ACR values

*/ @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) - public Builder acrValuesSupported(Optional> acrValuesSupported) { + public Builder acrValuesSupported(@Nullable OptionalNullable> acrValuesSupported) { this.acrValuesSupported = acrValuesSupported; return this; } public Builder acrValuesSupported(List acrValuesSupported) { - this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported); + return this; + } + + public Builder acrValuesSupported(Optional> acrValuesSupported) { + if (acrValuesSupported.isPresent()) { + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported.get()); + } else { + this.acrValuesSupported = OptionalNullable.absent(); + } + return this; + } + + public Builder acrValuesSupported(com.auth0.client.mgmt.core.Nullable> acrValuesSupported) { + if (acrValuesSupported.isNull()) { + this.acrValuesSupported = OptionalNullable.ofNull(); + } else if (acrValuesSupported.isEmpty()) { + this.acrValuesSupported = OptionalNullable.absent(); + } else { + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/Group.java b/src/main/java/com/auth0/client/mgmt/types/Group.java index ccaf8c3c..d4f16ff1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/Group.java +++ b/src/main/java/com/auth0/client/mgmt/types/Group.java @@ -3,9 +3,7 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -19,7 +17,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Group.Builder.class) @@ -32,12 +29,8 @@ public final class Group implements IGroup { private final Optional connectionId; - private final OptionalNullable organizationId; - private final Optional tenantName; - private final OptionalNullable description; - private final Optional createdAt; private final Optional updatedAt; @@ -49,9 +42,7 @@ private Group( Optional name, Optional externalId, Optional connectionId, - OptionalNullable organizationId, Optional tenantName, - OptionalNullable description, Optional createdAt, Optional updatedAt, Map additionalProperties) { @@ -59,9 +50,7 @@ private Group( this.name = name; this.externalId = externalId; this.connectionId = connectionId; - this.organizationId = organizationId; this.tenantName = tenantName; - this.description = description; this.createdAt = createdAt; this.updatedAt = updatedAt; this.additionalProperties = additionalProperties; @@ -77,7 +66,7 @@ public Optional getId() { } /** - * @return Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters. + * @return Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters. */ @JsonProperty("name") @java.lang.Override @@ -103,19 +92,6 @@ public Optional getConnectionId() { return connectionId; } - /** - * @return Identifier for the organization this group belongs to (if an organization group). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - @java.lang.Override - public OptionalNullable getOrganizationId() { - if (organizationId == null) { - return OptionalNullable.absent(); - } - return organizationId; - } - /** * @return Identifier for the tenant this group belongs to. */ @@ -125,16 +101,6 @@ public Optional getTenantName() { return tenantName; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - @java.lang.Override - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - /** * @return Timestamp of when the group was created. */ @@ -153,18 +119,6 @@ public Optional getUpdatedAt() { return updatedAt; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - private OptionalNullable _getOrganizationId() { - return organizationId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - private OptionalNullable _getDescription() { - return description; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -181,9 +135,7 @@ private boolean equalTo(Group other) { && name.equals(other.name) && externalId.equals(other.externalId) && connectionId.equals(other.connectionId) - && organizationId.equals(other.organizationId) && tenantName.equals(other.tenantName) - && description.equals(other.description) && createdAt.equals(other.createdAt) && updatedAt.equals(other.updatedAt); } @@ -195,9 +147,7 @@ public int hashCode() { this.name, this.externalId, this.connectionId, - this.organizationId, this.tenantName, - this.description, this.createdAt, this.updatedAt); } @@ -221,12 +171,8 @@ public static final class Builder { private Optional connectionId = Optional.empty(); - private OptionalNullable organizationId = OptionalNullable.absent(); - private Optional tenantName = Optional.empty(); - private OptionalNullable description = OptionalNullable.absent(); - private Optional createdAt = Optional.empty(); private Optional updatedAt = Optional.empty(); @@ -241,9 +187,7 @@ public Builder from(Group other) { name(other.getName()); externalId(other.getExternalId()); connectionId(other.getConnectionId()); - organizationId(other.getOrganizationId()); tenantName(other.getTenantName()); - description(other.getDescription()); createdAt(other.getCreatedAt()); updatedAt(other.getUpdatedAt()); return this; @@ -264,7 +208,7 @@ public Builder id(String id) { } /** - *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

+ *

Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

*/ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { @@ -305,40 +249,6 @@ public Builder connectionId(String connectionId) { return this; } - /** - *

Identifier for the organization this group belongs to (if an organization group).

- */ - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public Builder organizationId(@Nullable OptionalNullable organizationId) { - this.organizationId = organizationId; - return this; - } - - public Builder organizationId(String organizationId) { - this.organizationId = OptionalNullable.of(organizationId); - return this; - } - - public Builder organizationId(Optional organizationId) { - if (organizationId.isPresent()) { - this.organizationId = OptionalNullable.of(organizationId.get()); - } else { - this.organizationId = OptionalNullable.absent(); - } - return this; - } - - public Builder organizationId(com.auth0.client.mgmt.core.Nullable organizationId) { - if (organizationId.isNull()) { - this.organizationId = OptionalNullable.ofNull(); - } else if (organizationId.isEmpty()) { - this.organizationId = OptionalNullable.absent(); - } else { - this.organizationId = OptionalNullable.of(organizationId.get()); - } - return this; - } - /** *

Identifier for the tenant this group belongs to.

*/ @@ -353,37 +263,6 @@ public Builder tenantName(String tenantName) { return this; } - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public Builder description(@Nullable OptionalNullable description) { - this.description = description; - return this; - } - - public Builder description(String description) { - this.description = OptionalNullable.of(description); - return this; - } - - public Builder description(Optional description) { - if (description.isPresent()) { - this.description = OptionalNullable.of(description.get()); - } else { - this.description = OptionalNullable.absent(); - } - return this; - } - - public Builder description(com.auth0.client.mgmt.core.Nullable description) { - if (description.isNull()) { - this.description = OptionalNullable.ofNull(); - } else if (description.isEmpty()) { - this.description = OptionalNullable.absent(); - } else { - this.description = OptionalNullable.of(description.get()); - } - return this; - } - /** *

Timestamp of when the group was created.

*/ @@ -414,16 +293,7 @@ public Builder updatedAt(OffsetDateTime updatedAt) { public Group build() { return new Group( - id, - name, - externalId, - connectionId, - organizationId, - tenantName, - description, - createdAt, - updatedAt, - additionalProperties); + id, name, externalId, connectionId, tenantName, createdAt, updatedAt, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java index 81697eb4..efcaeaf8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java @@ -19,8 +19,6 @@ public interface IConnectionOptionsCommonOidc { Optional> getDomainAliases(); - Optional getDpopSigningAlg(); - OptionalNullable getFederatedConnectionsAccessTokens(); Optional getIconUrl(); diff --git a/src/main/java/com/auth0/client/mgmt/types/IGroup.java b/src/main/java/com/auth0/client/mgmt/types/IGroup.java index d73bc81f..e05c2efd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IGroup.java +++ b/src/main/java/com/auth0/client/mgmt/types/IGroup.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.OptionalNullable; import java.time.OffsetDateTime; import java.util.Optional; @@ -16,12 +15,8 @@ public interface IGroup { Optional getConnectionId(); - OptionalNullable getOrganizationId(); - Optional getTenantName(); - OptionalNullable getDescription(); - Optional getCreatedAt(); Optional getUpdatedAt(); diff --git a/src/main/java/com/auth0/client/mgmt/types/ListAculsResponseContentItem.java b/src/main/java/com/auth0/client/mgmt/types/ListAculsResponseContentItem.java index c3f67006..7269f4ec 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListAculsResponseContentItem.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListAculsResponseContentItem.java @@ -32,13 +32,13 @@ public final class ListAculsResponseContentItem { private final Optional renderingMode; - private final Optional> contextConfiguration; + private final OptionalNullable> contextConfiguration; private final OptionalNullable defaultHeadTagsDisabled; private final OptionalNullable usePageTemplate; - private final Optional> headTags; + private final OptionalNullable> headTags; private final OptionalNullable filters; @@ -49,10 +49,10 @@ private ListAculsResponseContentItem( Optional prompt, Optional screen, Optional renderingMode, - Optional> contextConfiguration, + OptionalNullable> contextConfiguration, OptionalNullable defaultHeadTagsDisabled, OptionalNullable usePageTemplate, - Optional> headTags, + OptionalNullable> headTags, OptionalNullable filters, Map additionalProperties) { this.tenant = tenant; @@ -99,8 +99,12 @@ public Optional getRenderingMode() { return renderingMode; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { + public OptionalNullable> getContextConfiguration() { + if (contextConfiguration == null) { + return OptionalNullable.absent(); + } return contextConfiguration; } @@ -131,8 +135,12 @@ public OptionalNullable getUsePageTemplate() { /** * @return An array of head tags */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("head_tags") - public Optional> getHeadTags() { + public OptionalNullable> getHeadTags() { + if (headTags == null) { + return OptionalNullable.absent(); + } return headTags; } @@ -145,6 +153,12 @@ public OptionalNullable getFilters() { return filters; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("context_configuration") + private OptionalNullable> _getContextConfiguration() { + return contextConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("default_head_tags_disabled") private OptionalNullable _getDefaultHeadTagsDisabled() { @@ -157,6 +171,12 @@ private OptionalNullable _getUsePageTemplate() { return usePageTemplate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("head_tags") + private OptionalNullable> _getHeadTags() { + return headTags; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("filters") private OptionalNullable _getFilters() { @@ -219,13 +239,13 @@ public static final class Builder { private Optional renderingMode = Optional.empty(); - private Optional> contextConfiguration = Optional.empty(); + private OptionalNullable> contextConfiguration = OptionalNullable.absent(); private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); private OptionalNullable usePageTemplate = OptionalNullable.absent(); - private Optional> headTags = Optional.empty(); + private OptionalNullable> headTags = OptionalNullable.absent(); private OptionalNullable filters = OptionalNullable.absent(); @@ -304,13 +324,35 @@ public Builder renderingMode(AculRenderingModeEnum renderingMode) { } @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { + public Builder contextConfiguration( + @Nullable OptionalNullable> contextConfiguration) { this.contextConfiguration = contextConfiguration; return this; } public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); + this.contextConfiguration = OptionalNullable.of(contextConfiguration); + return this; + } + + public Builder contextConfiguration(Optional> contextConfiguration) { + if (contextConfiguration.isPresent()) { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } else { + this.contextConfiguration = OptionalNullable.absent(); + } + return this; + } + + public Builder contextConfiguration( + com.auth0.client.mgmt.core.Nullable> contextConfiguration) { + if (contextConfiguration.isNull()) { + this.contextConfiguration = OptionalNullable.ofNull(); + } else if (contextConfiguration.isEmpty()) { + this.contextConfiguration = OptionalNullable.absent(); + } else { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } return this; } @@ -386,13 +428,33 @@ public Builder usePageTemplate(com.auth0.client.mgmt.core.Nullable useP *

An array of head tags

*/ @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { + public Builder headTags(@Nullable OptionalNullable> headTags) { this.headTags = headTags; return this; } public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); + this.headTags = OptionalNullable.of(headTags); + return this; + } + + public Builder headTags(Optional> headTags) { + if (headTags.isPresent()) { + this.headTags = OptionalNullable.of(headTags.get()); + } else { + this.headTags = OptionalNullable.absent(); + } + return this; + } + + public Builder headTags(com.auth0.client.mgmt.core.Nullable> headTags) { + if (headTags.isNull()) { + this.headTags = OptionalNullable.ofNull(); + } else if (headTags.isEmpty()) { + this.headTags = OptionalNullable.absent(); + } else { + this.headTags = OptionalNullable.of(headTags.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java index d9584dbd..e0650546 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java @@ -154,7 +154,7 @@ public OptionalNullable getAppType() { } /** - * @return Advanced Query in Lucene syntax.Permitted Queries:
  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results + * @return Advanced Query in Lucene syntax.Permitted Queries:
  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results */ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("q") @@ -558,7 +558,7 @@ public Builder appType(com.auth0.client.mgmt.core.Nullable appType) { } /** - *

Advanced Query in Lucene syntax.Permitted Queries:

  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results

+ *

Advanced Query in Lucene syntax.Permitted Queries:

  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results

*/ @JsonSetter(value = "q", nulls = Nulls.SKIP) public Builder q(@Nullable OptionalNullable q) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java index 4a49cd1d..0d559cc3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java @@ -47,7 +47,7 @@ private ListCustomDomainsRequestParameters( } /** - * @return Query in Lucene query string syntax. + * @return Query in Lucene query string syntax. */ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("q") @@ -175,7 +175,7 @@ public Builder from(ListCustomDomainsRequestParameters other) { } /** - *

Query in Lucene query string syntax.

+ *

Query in Lucene query string syntax.

*/ @JsonSetter(value = "q", nulls = Nulls.SKIP) public Builder q(@Nullable OptionalNullable q) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java index 6566d5cb..1123659f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java @@ -146,7 +146,7 @@ public OptionalNullable getIncludeFields() { } /** - * @return Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields. + * @return Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields. */ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("q") @@ -551,7 +551,7 @@ public Builder includeFields(Nullable includeFields) { } /** - *

Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields.

+ *

Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields.

*/ @JsonSetter(value = "q", nulls = Nulls.SKIP) public Builder q(@org.jetbrains.annotations.Nullable OptionalNullable q) { diff --git a/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java b/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java index 355be824..28a262ce 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java @@ -139,6 +139,8 @@ public final class PromptLanguageEnum { public static final PromptLanguageEnum NL = new PromptLanguageEnum(Value.NL, "nl"); + public static final PromptLanguageEnum ZH_MO = new PromptLanguageEnum(Value.ZH_MO, "zh-MO"); + public static final PromptLanguageEnum VI = new PromptLanguageEnum(Value.VI, "vi"); public static final PromptLanguageEnum BG = new PromptLanguageEnum(Value.BG, "bg"); @@ -333,6 +335,8 @@ public T visit(Visitor visitor) { return visitor.visitRu(); case NL: return visitor.visitNl(); + case ZH_MO: + return visitor.visitZhMo(); case VI: return visitor.visitVi(); case BG: @@ -504,6 +508,8 @@ public static PromptLanguageEnum valueOf(String value) { return RU; case "nl": return NL; + case "zh-MO": + return ZH_MO; case "vi": return VI; case "bg": @@ -700,6 +706,8 @@ public enum Value { ZH_HK, + ZH_MO, + ZH_TW, UNKNOWN @@ -866,6 +874,8 @@ public interface Visitor { T visitZhHk(); + T visitZhMo(); + T visitZhTw(); T visitUnknown(String unknownType); diff --git a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java index becc5f20..160f21fe 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java +++ b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java @@ -34,6 +34,8 @@ public final class PublicKeyCredential { private final Optional expiresAt; + private final Optional kid; + private final Map additionalProperties; private PublicKeyCredential( @@ -43,6 +45,7 @@ private PublicKeyCredential( Optional alg, Optional parseExpiryFromCert, Optional expiresAt, + Optional kid, Map additionalProperties) { this.credentialType = credentialType; this.name = name; @@ -50,6 +53,7 @@ private PublicKeyCredential( this.alg = alg; this.parseExpiryFromCert = parseExpiryFromCert; this.expiresAt = expiresAt; + this.kid = kid; this.additionalProperties = additionalProperties; } @@ -95,6 +99,14 @@ public Optional getExpiresAt() { return expiresAt; } + /** + * @return Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64} + */ + @JsonProperty("kid") + public Optional getKid() { + return kid; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -112,13 +124,14 @@ private boolean equalTo(PublicKeyCredential other) { && pem.equals(other.pem) && alg.equals(other.alg) && parseExpiryFromCert.equals(other.parseExpiryFromCert) - && expiresAt.equals(other.expiresAt); + && expiresAt.equals(other.expiresAt) + && kid.equals(other.kid); } @java.lang.Override public int hashCode() { return Objects.hash( - this.credentialType, this.name, this.pem, this.alg, this.parseExpiryFromCert, this.expiresAt); + this.credentialType, this.name, this.pem, this.alg, this.parseExpiryFromCert, this.expiresAt, this.kid); } @java.lang.Override @@ -174,6 +187,13 @@ public interface _FinalStage { _FinalStage expiresAt(Optional expiresAt); _FinalStage expiresAt(OffsetDateTime expiresAt); + + /** + *

Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64}

+ */ + _FinalStage kid(Optional kid); + + _FinalStage kid(String kid); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -182,6 +202,8 @@ public static final class Builder implements CredentialTypeStage, PemStage, _Fin private String pem; + private Optional kid = Optional.empty(); + private Optional expiresAt = Optional.empty(); private Optional parseExpiryFromCert = Optional.empty(); @@ -203,6 +225,7 @@ public Builder from(PublicKeyCredential other) { alg(other.getAlg()); parseExpiryFromCert(other.getParseExpiryFromCert()); expiresAt(other.getExpiresAt()); + kid(other.getKid()); return this; } @@ -225,6 +248,26 @@ public _FinalStage pem(@NotNull String pem) { return this; } + /** + *

Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64}

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage kid(String kid) { + this.kid = Optional.ofNullable(kid); + return this; + } + + /** + *

Optional kid (Key ID), used to uniquely identify the credential. If not specified, a kid value will be auto-generated. The kid header parameter in JWTs sent by your client should match this value. Valid format is [0-9a-zA-Z-_]{10,64}

+ */ + @java.lang.Override + @JsonSetter(value = "kid", nulls = Nulls.SKIP) + public _FinalStage kid(Optional kid) { + this.kid = kid; + return this; + } + /** *

The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to public_key credential type.

* @return Reference to {@code this} so that method calls can be chained together. @@ -301,7 +344,7 @@ public _FinalStage name(Optional name) { @java.lang.Override public PublicKeyCredential build() { return new PublicKeyCredential( - credentialType, name, pem, alg, parseExpiryFromCert, expiresAt, additionalProperties); + credentialType, name, pem, alg, parseExpiryFromCert, expiresAt, kid, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java index 29d88015..1d23f7a6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java @@ -54,7 +54,7 @@ public final class ResourceServer { private final OptionalNullable consentPolicy; - private final Optional> authorizationDetails; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -80,7 +80,7 @@ private ResourceServer( Optional tokenDialect, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, - Optional> authorizationDetails, + OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, Optional clientId, @@ -223,8 +223,12 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { + public OptionalNullable> getAuthorizationDetails() { + if (authorizationDetails == null) { + return OptionalNullable.absent(); + } return authorizationDetails; } @@ -262,6 +266,12 @@ private OptionalNullable _getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + private OptionalNullable> _getAuthorizationDetails() { + return authorizationDetails; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("proof_of_possession") private OptionalNullable _getProofOfPossession() { @@ -366,7 +376,7 @@ public static final class Builder { private OptionalNullable consentPolicy = OptionalNullable.absent(); - private Optional> authorizationDetails = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -645,13 +655,33 @@ public Builder consentPolicy( } @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { + public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; return this; } public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); + this.authorizationDetails = OptionalNullable.of(authorizationDetails); + return this; + } + + public Builder authorizationDetails(Optional> authorizationDetails) { + if (authorizationDetails.isPresent()) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } else { + this.authorizationDetails = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationDetails(com.auth0.client.mgmt.core.Nullable> authorizationDetails) { + if (authorizationDetails.isNull()) { + this.authorizationDetails = OptionalNullable.ofNull(); + } else if (authorizationDetails.isEmpty()) { + this.authorizationDetails = OptionalNullable.absent(); + } else { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java index af4f13d2..1dc66105 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java @@ -64,7 +64,7 @@ public final class RotateClientSecretResponseContent { private final Optional jwtConfiguration; - private final Optional> signingKeys; + private final OptionalNullable> signingKeys; private final OptionalNullable encryptionKey; @@ -153,7 +153,7 @@ private RotateClientSecretResponseContent( Optional oidcLogout, Optional> grantTypes, Optional jwtConfiguration, - Optional> signingKeys, + OptionalNullable> signingKeys, OptionalNullable encryptionKey, Optional sso, Optional ssoDisabled, @@ -395,8 +395,12 @@ public Optional getJwtConfiguration() { return jwtConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("signing_keys") - public Optional> getSigningKeys() { + public OptionalNullable> getSigningKeys() { + if (signingKeys == null) { + return OptionalNullable.absent(); + } return signingKeys; } @@ -640,6 +644,12 @@ private OptionalNullable _getSessionTransfer return sessionTransfer; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("signing_keys") + private OptionalNullable> _getSigningKeys() { + return signingKeys; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("encryption_key") private OptionalNullable _getEncryptionKey() { @@ -853,7 +863,7 @@ public static final class Builder { private Optional jwtConfiguration = Optional.empty(); - private Optional> signingKeys = Optional.empty(); + private OptionalNullable> signingKeys = OptionalNullable.absent(); private OptionalNullable encryptionKey = OptionalNullable.absent(); @@ -1272,13 +1282,33 @@ public Builder jwtConfiguration(ClientJwtConfiguration jwtConfiguration) { } @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { + public Builder signingKeys(@Nullable OptionalNullable> signingKeys) { this.signingKeys = signingKeys; return this; } public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); + this.signingKeys = OptionalNullable.of(signingKeys); + return this; + } + + public Builder signingKeys(Optional> signingKeys) { + if (signingKeys.isPresent()) { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } else { + this.signingKeys = OptionalNullable.absent(); + } + return this; + } + + public Builder signingKeys(com.auth0.client.mgmt.core.Nullable> signingKeys) { + if (signingKeys.isNull()) { + this.signingKeys = OptionalNullable.ofNull(); + } else if (signingKeys.isEmpty()) { + this.signingKeys = OptionalNullable.absent(); + } else { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionOptions.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionOptions.java index 488c8563..32f12cec 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionOptions.java @@ -26,7 +26,7 @@ public final class SelfServiceProfileSsoTicketConnectionOptions { private final OptionalNullable iconUrl; - private final Optional> domainAliases; + private final OptionalNullable> domainAliases; private final OptionalNullable idpinitiated; @@ -34,7 +34,7 @@ public final class SelfServiceProfileSsoTicketConnectionOptions { private SelfServiceProfileSsoTicketConnectionOptions( OptionalNullable iconUrl, - Optional> domainAliases, + OptionalNullable> domainAliases, OptionalNullable idpinitiated, Map additionalProperties) { this.iconUrl = iconUrl; @@ -58,8 +58,12 @@ public OptionalNullable getIconUrl() { /** * @return List of domain_aliases that can be authenticated in the Identity Provider */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("domain_aliases") - public Optional> getDomainAliases() { + public OptionalNullable> getDomainAliases() { + if (domainAliases == null) { + return OptionalNullable.absent(); + } return domainAliases; } @@ -78,6 +82,12 @@ private OptionalNullable _getIconUrl() { return iconUrl; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("domain_aliases") + private OptionalNullable> _getDomainAliases() { + return domainAliases; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("idpinitiated") private OptionalNullable _getIdpinitiated() { @@ -120,7 +130,7 @@ public static Builder builder() { public static final class Builder { private OptionalNullable iconUrl = OptionalNullable.absent(); - private Optional> domainAliases = Optional.empty(); + private OptionalNullable> domainAliases = OptionalNullable.absent(); private OptionalNullable idpinitiated = OptionalNullable.absent(); @@ -175,13 +185,33 @@ public Builder iconUrl(com.auth0.client.mgmt.core.Nullable iconUrl) { *

List of domain_aliases that can be authenticated in the Identity Provider

*/ @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) - public Builder domainAliases(Optional> domainAliases) { + public Builder domainAliases(@Nullable OptionalNullable> domainAliases) { this.domainAliases = domainAliases; return this; } public Builder domainAliases(List domainAliases) { - this.domainAliases = Optional.ofNullable(domainAliases); + this.domainAliases = OptionalNullable.of(domainAliases); + return this; + } + + public Builder domainAliases(Optional> domainAliases) { + if (domainAliases.isPresent()) { + this.domainAliases = OptionalNullable.of(domainAliases.get()); + } else { + this.domainAliases = OptionalNullable.absent(); + } + return this; + } + + public Builder domainAliases(com.auth0.client.mgmt.core.Nullable> domainAliases) { + if (domainAliases.isNull()) { + this.domainAliases = OptionalNullable.ofNull(); + } else if (domainAliases.isEmpty()) { + this.domainAliases = OptionalNullable.absent(); + } else { + this.domainAliases = OptionalNullable.of(domainAliases.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/SetDefaultCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetDefaultCustomDomainRequestContent.java new file mode 100644 index 00000000..aafa490b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SetDefaultCustomDomainRequestContent.java @@ -0,0 +1,130 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SetDefaultCustomDomainRequestContent.Builder.class) +public final class SetDefaultCustomDomainRequestContent { + private final String domain; + + private final Map additionalProperties; + + private SetDefaultCustomDomainRequestContent(String domain, Map additionalProperties) { + this.domain = domain; + this.additionalProperties = additionalProperties; + } + + /** + * @return The domain to set as the default custom domain. Must be a verified custom domain or the canonical domain. + */ + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SetDefaultCustomDomainRequestContent + && equalTo((SetDefaultCustomDomainRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SetDefaultCustomDomainRequestContent other) { + return domain.equals(other.domain); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.domain); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DomainStage builder() { + return new Builder(); + } + + public interface DomainStage { + /** + *

The domain to set as the default custom domain. Must be a verified custom domain or the canonical domain.

+ */ + _FinalStage domain(@NotNull String domain); + + Builder from(SetDefaultCustomDomainRequestContent other); + } + + public interface _FinalStage { + SetDefaultCustomDomainRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements DomainStage, _FinalStage { + private String domain; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SetDefaultCustomDomainRequestContent other) { + domain(other.getDomain()); + return this; + } + + /** + *

The domain to set as the default custom domain. Must be a verified custom domain or the canonical domain.

+ *

The domain to set as the default custom domain. Must be a verified custom domain or the canonical domain.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("domain") + public _FinalStage domain(@NotNull String domain) { + this.domain = Objects.requireNonNull(domain, "domain must not be null"); + return this; + } + + @java.lang.Override + public SetDefaultCustomDomainRequestContent build() { + return new SetDefaultCustomDomainRequestContent(domain, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java b/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java index 506db0d5..e8fbb955 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java +++ b/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java @@ -139,6 +139,8 @@ public final class SupportedLocales { public static final SupportedLocales NL = new SupportedLocales(Value.NL, "nl"); + public static final SupportedLocales ZH_MO = new SupportedLocales(Value.ZH_MO, "zh-MO"); + public static final SupportedLocales VI = new SupportedLocales(Value.VI, "vi"); public static final SupportedLocales BG = new SupportedLocales(Value.BG, "bg"); @@ -333,6 +335,8 @@ public T visit(Visitor visitor) { return visitor.visitRu(); case NL: return visitor.visitNl(); + case ZH_MO: + return visitor.visitZhMo(); case VI: return visitor.visitVi(); case BG: @@ -504,6 +508,8 @@ public static SupportedLocales valueOf(String value) { return RU; case "nl": return NL; + case "zh-MO": + return ZH_MO; case "vi": return VI; case "bg": @@ -700,6 +706,8 @@ public enum Value { ZH_HK, + ZH_MO, + ZH_TW, UNKNOWN @@ -866,6 +874,8 @@ public interface Visitor { T visitZhHk(); + T visitZhMo(); + T visitZhTw(); T visitUnknown(String unknownType); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenrenStrategy.java b/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEaEnum.java similarity index 56% rename from src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenrenStrategy.java rename to src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEaEnum.java index bbca7fd2..8e27f3a8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenrenStrategy.java +++ b/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEaEnum.java @@ -6,15 +6,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class CreateConnectionRequestContentRenrenStrategy { - public static final CreateConnectionRequestContentRenrenStrategy RENREN = - new CreateConnectionRequestContentRenrenStrategy(Value.RENREN, "renren"); +public final class SynchronizeGroupsEaEnum { + public static final SynchronizeGroupsEaEnum ALL = new SynchronizeGroupsEaEnum(Value.ALL, "all"); + + public static final SynchronizeGroupsEaEnum OFF = new SynchronizeGroupsEaEnum(Value.OFF, "off"); private final Value value; private final String string; - CreateConnectionRequestContentRenrenStrategy(Value value, String string) { + SynchronizeGroupsEaEnum(Value value, String string) { this.value = value; this.string = string; } @@ -32,8 +33,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof CreateConnectionRequestContentRenrenStrategy - && this.string.equals(((CreateConnectionRequestContentRenrenStrategy) other).string)); + || (other instanceof SynchronizeGroupsEaEnum + && this.string.equals(((SynchronizeGroupsEaEnum) other).string)); } @java.lang.Override @@ -43,8 +44,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case RENREN: - return visitor.visitRenren(); + case ALL: + return visitor.visitAll(); + case OFF: + return visitor.visitOff(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -52,23 +55,29 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentRenrenStrategy valueOf(String value) { + public static SynchronizeGroupsEaEnum valueOf(String value) { switch (value) { - case "renren": - return RENREN; + case "all": + return ALL; + case "off": + return OFF; default: - return new CreateConnectionRequestContentRenrenStrategy(Value.UNKNOWN, value); + return new SynchronizeGroupsEaEnum(Value.UNKNOWN, value); } } public enum Value { - RENREN, + ALL, + + OFF, UNKNOWN } public interface Visitor { - T visitRenren(); + T visitAll(); + + T visitOff(); T visitUnknown(String unknownType); } diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java index c7c7f9f2..957135a6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java @@ -152,6 +152,9 @@ public final class TenantSettingsSupportedLocalesEnum { public static final TenantSettingsSupportedLocalesEnum NL = new TenantSettingsSupportedLocalesEnum(Value.NL, "nl"); + public static final TenantSettingsSupportedLocalesEnum ZH_MO = + new TenantSettingsSupportedLocalesEnum(Value.ZH_MO, "zh-MO"); + public static final TenantSettingsSupportedLocalesEnum VI = new TenantSettingsSupportedLocalesEnum(Value.VI, "vi"); public static final TenantSettingsSupportedLocalesEnum BG = new TenantSettingsSupportedLocalesEnum(Value.BG, "bg"); @@ -352,6 +355,8 @@ public T visit(Visitor visitor) { return visitor.visitRu(); case NL: return visitor.visitNl(); + case ZH_MO: + return visitor.visitZhMo(); case VI: return visitor.visitVi(); case BG: @@ -523,6 +528,8 @@ public static TenantSettingsSupportedLocalesEnum valueOf(String value) { return RU; case "nl": return NL; + case "zh-MO": + return ZH_MO; case "vi": return VI; case "bg": @@ -719,6 +726,8 @@ public enum Value { ZH_HK, + ZH_MO, + ZH_TW, UNKNOWN @@ -885,6 +894,8 @@ public interface Visitor { T visitZhHk(); + T visitZhMo(); + T visitZhTw(); T visitUnknown(String unknownType); diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateAculResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateAculResponseContent.java index 09dcad64..ab04c851 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateAculResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateAculResponseContent.java @@ -26,13 +26,13 @@ public final class UpdateAculResponseContent { private final Optional renderingMode; - private final Optional> contextConfiguration; + private final OptionalNullable> contextConfiguration; private final OptionalNullable defaultHeadTagsDisabled; private final OptionalNullable usePageTemplate; - private final Optional> headTags; + private final OptionalNullable> headTags; private final OptionalNullable filters; @@ -40,10 +40,10 @@ public final class UpdateAculResponseContent { private UpdateAculResponseContent( Optional renderingMode, - Optional> contextConfiguration, + OptionalNullable> contextConfiguration, OptionalNullable defaultHeadTagsDisabled, OptionalNullable usePageTemplate, - Optional> headTags, + OptionalNullable> headTags, OptionalNullable filters, Map additionalProperties) { this.renderingMode = renderingMode; @@ -63,8 +63,12 @@ public Optional getRenderingMode() { return renderingMode; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { + public OptionalNullable> getContextConfiguration() { + if (contextConfiguration == null) { + return OptionalNullable.absent(); + } return contextConfiguration; } @@ -95,8 +99,12 @@ public OptionalNullable getUsePageTemplate() { /** * @return An array of head tags */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("head_tags") - public Optional> getHeadTags() { + public OptionalNullable> getHeadTags() { + if (headTags == null) { + return OptionalNullable.absent(); + } return headTags; } @@ -109,6 +117,12 @@ public OptionalNullable getFilters() { return filters; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("context_configuration") + private OptionalNullable> _getContextConfiguration() { + return contextConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("default_head_tags_disabled") private OptionalNullable _getDefaultHeadTagsDisabled() { @@ -121,6 +135,12 @@ private OptionalNullable _getUsePageTemplate() { return usePageTemplate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("head_tags") + private OptionalNullable> _getHeadTags() { + return headTags; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("filters") private OptionalNullable _getFilters() { @@ -171,13 +191,13 @@ public static Builder builder() { public static final class Builder { private Optional renderingMode = Optional.empty(); - private Optional> contextConfiguration = Optional.empty(); + private OptionalNullable> contextConfiguration = OptionalNullable.absent(); private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); private OptionalNullable usePageTemplate = OptionalNullable.absent(); - private Optional> headTags = Optional.empty(); + private OptionalNullable> headTags = OptionalNullable.absent(); private OptionalNullable filters = OptionalNullable.absent(); @@ -211,13 +231,35 @@ public Builder renderingMode(AculRenderingModeEnum renderingMode) { } @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { + public Builder contextConfiguration( + @Nullable OptionalNullable> contextConfiguration) { this.contextConfiguration = contextConfiguration; return this; } public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); + this.contextConfiguration = OptionalNullable.of(contextConfiguration); + return this; + } + + public Builder contextConfiguration(Optional> contextConfiguration) { + if (contextConfiguration.isPresent()) { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } else { + this.contextConfiguration = OptionalNullable.absent(); + } + return this; + } + + public Builder contextConfiguration( + com.auth0.client.mgmt.core.Nullable> contextConfiguration) { + if (contextConfiguration.isNull()) { + this.contextConfiguration = OptionalNullable.ofNull(); + } else if (contextConfiguration.isEmpty()) { + this.contextConfiguration = OptionalNullable.absent(); + } else { + this.contextConfiguration = OptionalNullable.of(contextConfiguration.get()); + } return this; } @@ -293,13 +335,33 @@ public Builder usePageTemplate(com.auth0.client.mgmt.core.Nullable useP *

An array of head tags

*/ @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { + public Builder headTags(@Nullable OptionalNullable> headTags) { this.headTags = headTags; return this; } public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); + this.headTags = OptionalNullable.of(headTags); + return this; + } + + public Builder headTags(Optional> headTags) { + if (headTags.isPresent()) { + this.headTags = OptionalNullable.of(headTags.get()); + } else { + this.headTags = OptionalNullable.absent(); + } + return this; + } + + public Builder headTags(com.auth0.client.mgmt.core.Nullable> headTags) { + if (headTags.isNull()) { + this.headTags = OptionalNullable.ofNull(); + } else if (headTags.isEmpty()) { + this.headTags = OptionalNullable.absent(); + } else { + this.headTags = OptionalNullable.of(headTags.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantRequestContent.java index f743e669..7121155a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantRequestContent.java @@ -24,7 +24,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UpdateClientGrantRequestContent.Builder.class) public final class UpdateClientGrantRequestContent { - private final Optional> scope; + private final OptionalNullable> scope; private final OptionalNullable organizationUsage; @@ -37,7 +37,7 @@ public final class UpdateClientGrantRequestContent { private final Map additionalProperties; private UpdateClientGrantRequestContent( - Optional> scope, + OptionalNullable> scope, OptionalNullable organizationUsage, OptionalNullable allowAnyOrganization, Optional> authorizationDetailsTypes, @@ -54,8 +54,12 @@ private UpdateClientGrantRequestContent( /** * @return Scopes allowed for this client grant. */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("scope") - public Optional> getScope() { + public OptionalNullable> getScope() { + if (scope == null) { + return OptionalNullable.absent(); + } return scope; } @@ -100,6 +104,12 @@ public OptionalNullable getAllowAllScopes() { return allowAllScopes; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("scope") + private OptionalNullable> _getScope() { + return scope; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("organization_usage") private OptionalNullable _getOrganizationUsage() { @@ -158,7 +168,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional> scope = Optional.empty(); + private OptionalNullable> scope = OptionalNullable.absent(); private OptionalNullable organizationUsage = OptionalNullable.absent(); @@ -187,13 +197,33 @@ public Builder from(UpdateClientGrantRequestContent other) { *

Scopes allowed for this client grant.

*/ @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { + public Builder scope(@Nullable OptionalNullable> scope) { this.scope = scope; return this; } public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); + this.scope = OptionalNullable.of(scope); + return this; + } + + public Builder scope(Optional> scope) { + if (scope.isPresent()) { + this.scope = OptionalNullable.of(scope.get()); + } else { + this.scope = OptionalNullable.absent(); + } + return this; + } + + public Builder scope(com.auth0.client.mgmt.core.Nullable> scope) { + if (scope.isNull()) { + this.scope = OptionalNullable.ofNull(); + } else if (scope.isEmpty()) { + this.scope = OptionalNullable.absent(); + } else { + this.scope = OptionalNullable.of(scope.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java index 1fc60b7c..2a177d1c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java @@ -102,7 +102,7 @@ public final class UpdateClientRequestContent { private final OptionalNullable organizationRequireBehavior; - private final Optional> organizationDiscoveryMethods; + private final OptionalNullable> organizationDiscoveryMethods; private final OptionalNullable clientAuthenticationMethods; @@ -122,7 +122,7 @@ public final class UpdateClientRequestContent { private final OptionalNullable expressConfiguration; - private final Optional> asyncApprovalNotificationChannels; + private final OptionalNullable> asyncApprovalNotificationChannels; private final Map additionalProperties; @@ -166,7 +166,7 @@ private UpdateClientRequestContent( OptionalNullable defaultOrganization, OptionalNullable organizationUsage, OptionalNullable organizationRequireBehavior, - Optional> organizationDiscoveryMethods, + OptionalNullable> organizationDiscoveryMethods, OptionalNullable clientAuthenticationMethods, Optional requirePushedAuthorizationRequests, Optional requireProofOfPossession, @@ -176,7 +176,7 @@ private UpdateClientRequestContent( OptionalNullable tokenExchange, OptionalNullable parRequestExpiry, OptionalNullable expressConfiguration, - Optional> asyncApprovalNotificationChannels, + OptionalNullable> asyncApprovalNotificationChannels, Map additionalProperties) { this.name = name; this.description = description; @@ -543,8 +543,12 @@ public OptionalNullable getOrganizat /** * @return Defines the available methods for organization discovery during the pre_login_prompt. Users can discover their organization either by email, organization_name or both. */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("organization_discovery_methods") - public Optional> getOrganizationDiscoveryMethods() { + public OptionalNullable> getOrganizationDiscoveryMethods() { + if (organizationDiscoveryMethods == null) { + return OptionalNullable.absent(); + } return organizationDiscoveryMethods; } @@ -631,8 +635,12 @@ public OptionalNullable getExpressConfiguration() { return expressConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("async_approval_notification_channels") - public Optional> getAsyncApprovalNotificationChannels() { + public OptionalNullable> getAsyncApprovalNotificationChannels() { + if (asyncApprovalNotificationChannels == null) { + return OptionalNullable.absent(); + } return asyncApprovalNotificationChannels; } @@ -690,6 +698,12 @@ private OptionalNullable _getOrganiz return organizationRequireBehavior; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_discovery_methods") + private OptionalNullable> _getOrganizationDiscoveryMethods() { + return organizationDiscoveryMethods; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("client_authentication_methods") private OptionalNullable _getClientAuthenticationMethods() { @@ -726,6 +740,12 @@ private OptionalNullable _getExpressConfiguration() return expressConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("async_approval_notification_channels") + private OptionalNullable> _getAsyncApprovalNotificationChannels() { + return asyncApprovalNotificationChannels; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -937,7 +957,8 @@ public static final class Builder { private OptionalNullable organizationRequireBehavior = OptionalNullable.absent(); - private Optional> organizationDiscoveryMethods = Optional.empty(); + private OptionalNullable> organizationDiscoveryMethods = + OptionalNullable.absent(); private OptionalNullable clientAuthenticationMethods = OptionalNullable.absent(); @@ -957,8 +978,8 @@ public static final class Builder { private OptionalNullable expressConfiguration = OptionalNullable.absent(); - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); + private OptionalNullable> asyncApprovalNotificationChannels = + OptionalNullable.absent(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -1723,14 +1744,37 @@ public Builder organizationRequireBehavior( */ @JsonSetter(value = "organization_discovery_methods", nulls = Nulls.SKIP) public Builder organizationDiscoveryMethods( - Optional> organizationDiscoveryMethods) { + @Nullable OptionalNullable> organizationDiscoveryMethods) { this.organizationDiscoveryMethods = organizationDiscoveryMethods; return this; } public Builder organizationDiscoveryMethods( List organizationDiscoveryMethods) { - this.organizationDiscoveryMethods = Optional.ofNullable(organizationDiscoveryMethods); + this.organizationDiscoveryMethods = OptionalNullable.of(organizationDiscoveryMethods); + return this; + } + + public Builder organizationDiscoveryMethods( + Optional> organizationDiscoveryMethods) { + if (organizationDiscoveryMethods.isPresent()) { + this.organizationDiscoveryMethods = OptionalNullable.of(organizationDiscoveryMethods.get()); + } else { + this.organizationDiscoveryMethods = OptionalNullable.absent(); + } + return this; + } + + public Builder organizationDiscoveryMethods( + com.auth0.client.mgmt.core.Nullable> + organizationDiscoveryMethods) { + if (organizationDiscoveryMethods.isNull()) { + this.organizationDiscoveryMethods = OptionalNullable.ofNull(); + } else if (organizationDiscoveryMethods.isEmpty()) { + this.organizationDiscoveryMethods = OptionalNullable.absent(); + } else { + this.organizationDiscoveryMethods = OptionalNullable.of(organizationDiscoveryMethods.get()); + } return this; } @@ -1981,14 +2025,39 @@ public Builder expressConfiguration( @JsonSetter(value = "async_approval_notification_channels", nulls = Nulls.SKIP) public Builder asyncApprovalNotificationChannels( - Optional> asyncApprovalNotificationChannels) { + @Nullable + OptionalNullable> + asyncApprovalNotificationChannels) { this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; return this; } public Builder asyncApprovalNotificationChannels( List asyncApprovalNotificationChannels) { - this.asyncApprovalNotificationChannels = Optional.ofNullable(asyncApprovalNotificationChannels); + this.asyncApprovalNotificationChannels = OptionalNullable.of(asyncApprovalNotificationChannels); + return this; + } + + public Builder asyncApprovalNotificationChannels( + Optional> asyncApprovalNotificationChannels) { + if (asyncApprovalNotificationChannels.isPresent()) { + this.asyncApprovalNotificationChannels = OptionalNullable.of(asyncApprovalNotificationChannels.get()); + } else { + this.asyncApprovalNotificationChannels = OptionalNullable.absent(); + } + return this; + } + + public Builder asyncApprovalNotificationChannels( + com.auth0.client.mgmt.core.Nullable> + asyncApprovalNotificationChannels) { + if (asyncApprovalNotificationChannels.isNull()) { + this.asyncApprovalNotificationChannels = OptionalNullable.ofNull(); + } else if (asyncApprovalNotificationChannels.isEmpty()) { + this.asyncApprovalNotificationChannels = OptionalNullable.absent(); + } else { + this.asyncApprovalNotificationChannels = OptionalNullable.of(asyncApprovalNotificationChannels.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java index ae9add22..2c40df21 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java @@ -64,7 +64,7 @@ public final class UpdateClientResponseContent { private final Optional jwtConfiguration; - private final Optional> signingKeys; + private final OptionalNullable> signingKeys; private final OptionalNullable encryptionKey; @@ -153,7 +153,7 @@ private UpdateClientResponseContent( Optional oidcLogout, Optional> grantTypes, Optional jwtConfiguration, - Optional> signingKeys, + OptionalNullable> signingKeys, OptionalNullable encryptionKey, Optional sso, Optional ssoDisabled, @@ -395,8 +395,12 @@ public Optional getJwtConfiguration() { return jwtConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("signing_keys") - public Optional> getSigningKeys() { + public OptionalNullable> getSigningKeys() { + if (signingKeys == null) { + return OptionalNullable.absent(); + } return signingKeys; } @@ -640,6 +644,12 @@ private OptionalNullable _getSessionTransfer return sessionTransfer; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("signing_keys") + private OptionalNullable> _getSigningKeys() { + return signingKeys; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("encryption_key") private OptionalNullable _getEncryptionKey() { @@ -853,7 +863,7 @@ public static final class Builder { private Optional jwtConfiguration = Optional.empty(); - private Optional> signingKeys = Optional.empty(); + private OptionalNullable> signingKeys = OptionalNullable.absent(); private OptionalNullable encryptionKey = OptionalNullable.absent(); @@ -1272,13 +1282,33 @@ public Builder jwtConfiguration(ClientJwtConfiguration jwtConfiguration) { } @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { + public Builder signingKeys(@Nullable OptionalNullable> signingKeys) { this.signingKeys = signingKeys; return this; } public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); + this.signingKeys = OptionalNullable.of(signingKeys); + return this; + } + + public Builder signingKeys(Optional> signingKeys) { + if (signingKeys.isPresent()) { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } else { + this.signingKeys = OptionalNullable.absent(); + } + return this; + } + + public Builder signingKeys(com.auth0.client.mgmt.core.Nullable> signingKeys) { + if (signingKeys.isNull()) { + this.signingKeys = OptionalNullable.ofNull(); + } else if (signingKeys.isEmpty()) { + this.signingKeys = OptionalNullable.absent(); + } else { + this.signingKeys = OptionalNullable.of(signingKeys.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java index 9c82bf29..11c56281 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java @@ -26,7 +26,7 @@ public final class UpdateConnectionOptions { private final OptionalNullable validation; - private final Optional> nonPersistentAttrs; + private final OptionalNullable> nonPersistentAttrs; private final Optional> precedence; @@ -38,6 +38,8 @@ public final class UpdateConnectionOptions { private final Optional importMode; + private final OptionalNullable>> configuration; + private final Optional customScripts; private final OptionalNullable authenticationMethods; @@ -85,12 +87,13 @@ public final class UpdateConnectionOptions { private UpdateConnectionOptions( OptionalNullable validation, - Optional> nonPersistentAttrs, + OptionalNullable> nonPersistentAttrs, Optional> precedence, Optional attributes, Optional enableScriptContext, Optional enabledDatabaseCustomization, Optional importMode, + OptionalNullable>> configuration, Optional customScripts, OptionalNullable authenticationMethods, OptionalNullable passkeyOptions, @@ -120,6 +123,7 @@ private UpdateConnectionOptions( this.enableScriptContext = enableScriptContext; this.enabledDatabaseCustomization = enabledDatabaseCustomization; this.importMode = importMode; + this.configuration = configuration; this.customScripts = customScripts; this.authenticationMethods = authenticationMethods; this.passkeyOptions = passkeyOptions; @@ -156,8 +160,12 @@ public OptionalNullable getValidation() { /** * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("non_persistent_attrs") - public Optional> getNonPersistentAttrs() { + public OptionalNullable> getNonPersistentAttrs() { + if (nonPersistentAttrs == null) { + return OptionalNullable.absent(); + } return nonPersistentAttrs; } @@ -198,6 +206,18 @@ public Optional getImportMode() { return importMode; } + /** + * @return Stores encrypted string only configurations for connections + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("configuration") + public OptionalNullable>> getConfiguration() { + if (configuration == null) { + return OptionalNullable.absent(); + } + return configuration; + } + @JsonProperty("customScripts") public Optional getCustomScripts() { return customScripts; @@ -349,6 +369,18 @@ private OptionalNullable _getValidation() { return validation; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("non_persistent_attrs") + private OptionalNullable> _getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("configuration") + private OptionalNullable>> _getConfiguration() { + return configuration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authentication_methods") private OptionalNullable _getAuthenticationMethods() { @@ -429,6 +461,7 @@ private boolean equalTo(UpdateConnectionOptions other) { && enableScriptContext.equals(other.enableScriptContext) && enabledDatabaseCustomization.equals(other.enabledDatabaseCustomization) && importMode.equals(other.importMode) + && configuration.equals(other.configuration) && customScripts.equals(other.customScripts) && authenticationMethods.equals(other.authenticationMethods) && passkeyOptions.equals(other.passkeyOptions) @@ -462,6 +495,7 @@ public int hashCode() { this.enableScriptContext, this.enabledDatabaseCustomization, this.importMode, + this.configuration, this.customScripts, this.authenticationMethods, this.passkeyOptions, @@ -498,7 +532,7 @@ public static Builder builder() { public static final class Builder { private OptionalNullable validation = OptionalNullable.absent(); - private Optional> nonPersistentAttrs = Optional.empty(); + private OptionalNullable> nonPersistentAttrs = OptionalNullable.absent(); private Optional> precedence = Optional.empty(); @@ -510,6 +544,8 @@ public static final class Builder { private Optional importMode = Optional.empty(); + private OptionalNullable>> configuration = OptionalNullable.absent(); + private Optional customScripts = Optional.empty(); private OptionalNullable authenticationMethods = OptionalNullable.absent(); @@ -569,6 +605,7 @@ public Builder from(UpdateConnectionOptions other) { enableScriptContext(other.getEnableScriptContext()); enabledDatabaseCustomization(other.getEnabledDatabaseCustomization()); importMode(other.getImportMode()); + configuration(other.getConfiguration()); customScripts(other.getCustomScripts()); authenticationMethods(other.getAuthenticationMethods()); passkeyOptions(other.getPasskeyOptions()); @@ -628,13 +665,33 @@ public Builder validation(com.auth0.client.mgmt.core.NullableAn array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

*/ @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + public Builder nonPersistentAttrs(@Nullable OptionalNullable> nonPersistentAttrs) { this.nonPersistentAttrs = nonPersistentAttrs; return this; } public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + this.nonPersistentAttrs = OptionalNullable.of(nonPersistentAttrs); + return this; + } + + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + if (nonPersistentAttrs.isPresent()) { + this.nonPersistentAttrs = OptionalNullable.of(nonPersistentAttrs.get()); + } else { + this.nonPersistentAttrs = OptionalNullable.absent(); + } + return this; + } + + public Builder nonPersistentAttrs(com.auth0.client.mgmt.core.Nullable> nonPersistentAttrs) { + if (nonPersistentAttrs.isNull()) { + this.nonPersistentAttrs = OptionalNullable.ofNull(); + } else if (nonPersistentAttrs.isEmpty()) { + this.nonPersistentAttrs = OptionalNullable.absent(); + } else { + this.nonPersistentAttrs = OptionalNullable.of(nonPersistentAttrs.get()); + } return this; } @@ -705,6 +762,41 @@ public Builder importMode(Boolean importMode) { return this; } + /** + *

Stores encrypted string only configurations for connections

+ */ + @JsonSetter(value = "configuration", nulls = Nulls.SKIP) + public Builder configuration(@Nullable OptionalNullable>> configuration) { + this.configuration = configuration; + return this; + } + + public Builder configuration(Map> configuration) { + this.configuration = OptionalNullable.of(configuration); + return this; + } + + public Builder configuration(Optional>> configuration) { + if (configuration.isPresent()) { + this.configuration = OptionalNullable.of(configuration.get()); + } else { + this.configuration = OptionalNullable.absent(); + } + return this; + } + + public Builder configuration( + com.auth0.client.mgmt.core.Nullable>> configuration) { + if (configuration.isNull()) { + this.configuration = OptionalNullable.ofNull(); + } else if (configuration.isEmpty()) { + this.configuration = OptionalNullable.absent(); + } else { + this.configuration = OptionalNullable.of(configuration.get()); + } + return this; + } + @JsonSetter(value = "customScripts", nulls = Nulls.SKIP) public Builder customScripts(Optional customScripts) { this.customScripts = customScripts; @@ -1173,6 +1265,7 @@ public UpdateConnectionOptions build() { enableScriptContext, enabledDatabaseCustomization, importMode, + configuration, customScripts, authenticationMethods, passkeyOptions, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java index 96d0624d..c528a7db 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java @@ -28,7 +28,7 @@ public final class UpdateConnectionRequestContent { private final OptionalNullable options; - private final Optional> enabledClients; + private final OptionalNullable> enabledClients; private final Optional isDomainConnection; @@ -47,7 +47,7 @@ public final class UpdateConnectionRequestContent { private UpdateConnectionRequestContent( Optional displayName, OptionalNullable options, - Optional> enabledClients, + OptionalNullable> enabledClients, Optional isDomainConnection, Optional showAsButton, Optional> realms, @@ -87,8 +87,12 @@ public OptionalNullable getOptions() { /** * @return DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable or disable the connection for any clients. */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("enabled_clients") - public Optional> getEnabledClients() { + public OptionalNullable> getEnabledClients() { + if (enabledClients == null) { + return OptionalNullable.absent(); + } return enabledClients; } @@ -137,6 +141,12 @@ private OptionalNullable _getOptions() { return options; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("enabled_clients") + private OptionalNullable> _getEnabledClients() { + return enabledClients; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -189,7 +199,7 @@ public static final class Builder { private OptionalNullable options = OptionalNullable.absent(); - private Optional> enabledClients = Optional.empty(); + private OptionalNullable> enabledClients = OptionalNullable.absent(); private Optional isDomainConnection = Optional.empty(); @@ -270,13 +280,33 @@ public Builder options(com.auth0.client.mgmt.core.NullableDEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable or disable the connection for any clients.

*/ @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { + public Builder enabledClients(@Nullable OptionalNullable> enabledClients) { this.enabledClients = enabledClients; return this; } public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); + this.enabledClients = OptionalNullable.of(enabledClients); + return this; + } + + public Builder enabledClients(Optional> enabledClients) { + if (enabledClients.isPresent()) { + this.enabledClients = OptionalNullable.of(enabledClients.get()); + } else { + this.enabledClients = OptionalNullable.absent(); + } + return this; + } + + public Builder enabledClients(com.auth0.client.mgmt.core.Nullable> enabledClients) { + if (enabledClients.isNull()) { + this.enabledClients = OptionalNullable.ofNull(); + } else if (enabledClients.isEmpty()) { + this.enabledClients = OptionalNullable.absent(); + } else { + this.enabledClients = OptionalNullable.of(enabledClients.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentMiicard.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentMiicard.java deleted file mode 100644 index 158397f8..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentMiicard.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * 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.auth0.client.mgmt.core.OptionalNullable; -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 = UpdateConnectionRequestContentMiicard.Builder.class) -public final class UpdateConnectionRequestContentMiicard implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentMiicard( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentMiicard - && equalTo((UpdateConnectionRequestContentMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentMiicard other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @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 displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentMiicard other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsMiicard options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentMiicard build() { - return new UpdateConnectionRequestContentMiicard( - displayName, enabledClients, isDomainConnection, metadata, options, 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/UpdateConnectionRequestContentRenren.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentRenren.java deleted file mode 100644 index 147b1f46..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentRenren.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * 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.auth0.client.mgmt.core.OptionalNullable; -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 = UpdateConnectionRequestContentRenren.Builder.class) -public final class UpdateConnectionRequestContentRenren implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentRenren( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentRenren - && equalTo((UpdateConnectionRequestContentRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentRenren other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @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 displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentRenren other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsRenren options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentRenren build() { - return new UpdateConnectionRequestContentRenren( - displayName, enabledClients, isDomainConnection, metadata, options, 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/UpdateDefaultCanonicalDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCanonicalDomainResponseContent.java new file mode 100644 index 00000000..97fdeb39 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCanonicalDomainResponseContent.java @@ -0,0 +1,130 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateDefaultCanonicalDomainResponseContent.Builder.class) +public final class UpdateDefaultCanonicalDomainResponseContent { + private final String domain; + + private final Map additionalProperties; + + private UpdateDefaultCanonicalDomainResponseContent(String domain, Map additionalProperties) { + this.domain = domain; + this.additionalProperties = additionalProperties; + } + + /** + * @return Domain name. + */ + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateDefaultCanonicalDomainResponseContent + && equalTo((UpdateDefaultCanonicalDomainResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateDefaultCanonicalDomainResponseContent other) { + return domain.equals(other.domain); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.domain); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DomainStage builder() { + return new Builder(); + } + + public interface DomainStage { + /** + *

Domain name.

+ */ + _FinalStage domain(@NotNull String domain); + + Builder from(UpdateDefaultCanonicalDomainResponseContent other); + } + + public interface _FinalStage { + UpdateDefaultCanonicalDomainResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements DomainStage, _FinalStage { + private String domain; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateDefaultCanonicalDomainResponseContent other) { + domain(other.getDomain()); + return this; + } + + /** + *

Domain name.

+ *

Domain name.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("domain") + public _FinalStage domain(@NotNull String domain) { + this.domain = Objects.requireNonNull(domain, "domain must not be null"); + return this; + } + + @java.lang.Override + public UpdateDefaultCanonicalDomainResponseContent build() { + return new UpdateDefaultCanonicalDomainResponseContent(domain, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCustomDomainResponseContent.java new file mode 100644 index 00000000..4779ecd9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCustomDomainResponseContent.java @@ -0,0 +1,632 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateDefaultCustomDomainResponseContent.Builder.class) +public final class UpdateDefaultCustomDomainResponseContent { + private final String customDomainId; + + private final String domain; + + private final boolean primary; + + private final Optional isDefault; + + private final CustomDomainStatusFilterEnum status; + + private final CustomDomainTypeEnum type; + + private final Optional originDomainName; + + private final Optional verification; + + private final OptionalNullable customClientIpHeader; + + private final Optional tlsPolicy; + + private final Optional>> domainMetadata; + + private final Optional certificate; + + private final Optional relyingPartyIdentifier; + + private final Map additionalProperties; + + private UpdateDefaultCustomDomainResponseContent( + String customDomainId, + String domain, + boolean primary, + Optional isDefault, + CustomDomainStatusFilterEnum status, + CustomDomainTypeEnum type, + Optional originDomainName, + Optional verification, + OptionalNullable customClientIpHeader, + Optional tlsPolicy, + Optional>> domainMetadata, + Optional certificate, + Optional relyingPartyIdentifier, + Map additionalProperties) { + this.customDomainId = customDomainId; + this.domain = domain; + this.primary = primary; + this.isDefault = isDefault; + this.status = status; + this.type = type; + this.originDomainName = originDomainName; + this.verification = verification; + this.customClientIpHeader = customClientIpHeader; + this.tlsPolicy = tlsPolicy; + this.domainMetadata = domainMetadata; + this.certificate = certificate; + this.relyingPartyIdentifier = relyingPartyIdentifier; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the custom domain. + */ + @JsonProperty("custom_domain_id") + public String getCustomDomainId() { + return customDomainId; + } + + /** + * @return Domain name. + */ + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + /** + * @return Whether this is a primary domain (true) or not (false). + */ + @JsonProperty("primary") + public boolean getPrimary() { + return primary; + } + + /** + * @return Whether this is the default custom domain (true) or not (false). + */ + @JsonProperty("is_default") + public Optional getIsDefault() { + return isDefault; + } + + @JsonProperty("status") + public CustomDomainStatusFilterEnum getStatus() { + return status; + } + + @JsonProperty("type") + public CustomDomainTypeEnum getType() { + return type; + } + + /** + * @return Intermediate address. + */ + @JsonProperty("origin_domain_name") + public Optional getOriginDomainName() { + return originDomainName; + } + + @JsonProperty("verification") + public Optional getVerification() { + return verification; + } + + /** + * @return The HTTP header to fetch the client's IP address + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("custom_client_ip_header") + public OptionalNullable getCustomClientIpHeader() { + if (customClientIpHeader == null) { + return OptionalNullable.absent(); + } + return customClientIpHeader; + } + + /** + * @return The TLS version policy + */ + @JsonProperty("tls_policy") + public Optional getTlsPolicy() { + return tlsPolicy; + } + + @JsonProperty("domain_metadata") + public Optional>> getDomainMetadata() { + return domainMetadata; + } + + @JsonProperty("certificate") + public Optional getCertificate() { + return certificate; + } + + /** + * @return Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. + */ + @JsonProperty("relying_party_identifier") + public Optional getRelyingPartyIdentifier() { + return relyingPartyIdentifier; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("custom_client_ip_header") + private OptionalNullable _getCustomClientIpHeader() { + return customClientIpHeader; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateDefaultCustomDomainResponseContent + && equalTo((UpdateDefaultCustomDomainResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateDefaultCustomDomainResponseContent other) { + return customDomainId.equals(other.customDomainId) + && domain.equals(other.domain) + && primary == other.primary + && isDefault.equals(other.isDefault) + && status.equals(other.status) + && type.equals(other.type) + && originDomainName.equals(other.originDomainName) + && verification.equals(other.verification) + && customClientIpHeader.equals(other.customClientIpHeader) + && tlsPolicy.equals(other.tlsPolicy) + && domainMetadata.equals(other.domainMetadata) + && certificate.equals(other.certificate) + && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.customDomainId, + this.domain, + this.primary, + this.isDefault, + this.status, + this.type, + this.originDomainName, + this.verification, + this.customClientIpHeader, + this.tlsPolicy, + this.domainMetadata, + this.certificate, + this.relyingPartyIdentifier); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static CustomDomainIdStage builder() { + return new Builder(); + } + + public interface CustomDomainIdStage { + /** + *

ID of the custom domain.

+ */ + DomainStage customDomainId(@NotNull String customDomainId); + + Builder from(UpdateDefaultCustomDomainResponseContent other); + } + + public interface DomainStage { + /** + *

Domain name.

+ */ + PrimaryStage domain(@NotNull String domain); + } + + public interface PrimaryStage { + /** + *

Whether this is a primary domain (true) or not (false).

+ */ + StatusStage primary(boolean primary); + } + + public interface StatusStage { + TypeStage status(@NotNull CustomDomainStatusFilterEnum status); + } + + public interface TypeStage { + _FinalStage type(@NotNull CustomDomainTypeEnum type); + } + + public interface _FinalStage { + UpdateDefaultCustomDomainResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Whether this is the default custom domain (true) or not (false).

+ */ + _FinalStage isDefault(Optional isDefault); + + _FinalStage isDefault(Boolean isDefault); + + /** + *

Intermediate address.

+ */ + _FinalStage originDomainName(Optional originDomainName); + + _FinalStage originDomainName(String originDomainName); + + _FinalStage verification(Optional verification); + + _FinalStage verification(DomainVerification verification); + + /** + *

The HTTP header to fetch the client's IP address

+ */ + _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader); + + _FinalStage customClientIpHeader(String customClientIpHeader); + + _FinalStage customClientIpHeader(Optional customClientIpHeader); + + _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader); + + /** + *

The TLS version policy

+ */ + _FinalStage tlsPolicy(Optional tlsPolicy); + + _FinalStage tlsPolicy(String tlsPolicy); + + _FinalStage domainMetadata(Optional>> domainMetadata); + + _FinalStage domainMetadata(Map> domainMetadata); + + _FinalStage certificate(Optional certificate); + + _FinalStage certificate(DomainCertificate certificate); + + /** + *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

+ */ + _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); + + _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements CustomDomainIdStage, DomainStage, PrimaryStage, StatusStage, TypeStage, _FinalStage { + private String customDomainId; + + private String domain; + + private boolean primary; + + private CustomDomainStatusFilterEnum status; + + private CustomDomainTypeEnum type; + + private Optional relyingPartyIdentifier = Optional.empty(); + + private Optional certificate = Optional.empty(); + + private Optional>> domainMetadata = Optional.empty(); + + private Optional tlsPolicy = Optional.empty(); + + private OptionalNullable customClientIpHeader = OptionalNullable.absent(); + + private Optional verification = Optional.empty(); + + private Optional originDomainName = Optional.empty(); + + private Optional isDefault = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateDefaultCustomDomainResponseContent other) { + customDomainId(other.getCustomDomainId()); + domain(other.getDomain()); + primary(other.getPrimary()); + isDefault(other.getIsDefault()); + status(other.getStatus()); + type(other.getType()); + originDomainName(other.getOriginDomainName()); + verification(other.getVerification()); + customClientIpHeader(other.getCustomClientIpHeader()); + tlsPolicy(other.getTlsPolicy()); + domainMetadata(other.getDomainMetadata()); + certificate(other.getCertificate()); + relyingPartyIdentifier(other.getRelyingPartyIdentifier()); + return this; + } + + /** + *

ID of the custom domain.

+ *

ID of the custom domain.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("custom_domain_id") + public DomainStage customDomainId(@NotNull String customDomainId) { + this.customDomainId = Objects.requireNonNull(customDomainId, "customDomainId must not be null"); + return this; + } + + /** + *

Domain name.

+ *

Domain name.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("domain") + public PrimaryStage domain(@NotNull String domain) { + this.domain = Objects.requireNonNull(domain, "domain must not be null"); + return this; + } + + /** + *

Whether this is a primary domain (true) or not (false).

+ *

Whether this is a primary domain (true) or not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("primary") + public StatusStage primary(boolean primary) { + this.primary = primary; + return this; + } + + @java.lang.Override + @JsonSetter("status") + public TypeStage status(@NotNull CustomDomainStatusFilterEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull CustomDomainTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { + this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); + return this; + } + + /** + *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

+ */ + @java.lang.Override + @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) + public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { + this.relyingPartyIdentifier = relyingPartyIdentifier; + return this; + } + + @java.lang.Override + public _FinalStage certificate(DomainCertificate certificate) { + this.certificate = Optional.ofNullable(certificate); + return this; + } + + @java.lang.Override + @JsonSetter(value = "certificate", nulls = Nulls.SKIP) + public _FinalStage certificate(Optional certificate) { + this.certificate = certificate; + return this; + } + + @java.lang.Override + public _FinalStage domainMetadata(Map> domainMetadata) { + this.domainMetadata = Optional.ofNullable(domainMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) + public _FinalStage domainMetadata(Optional>> domainMetadata) { + this.domainMetadata = domainMetadata; + return this; + } + + /** + *

The TLS version policy

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tlsPolicy(String tlsPolicy) { + this.tlsPolicy = Optional.ofNullable(tlsPolicy); + return this; + } + + /** + *

The TLS version policy

+ */ + @java.lang.Override + @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) + public _FinalStage tlsPolicy(Optional tlsPolicy) { + this.tlsPolicy = tlsPolicy; + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader) { + if (customClientIpHeader.isNull()) { + this.customClientIpHeader = OptionalNullable.ofNull(); + } else if (customClientIpHeader.isEmpty()) { + this.customClientIpHeader = OptionalNullable.absent(); + } else { + this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); + } + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage customClientIpHeader(Optional customClientIpHeader) { + if (customClientIpHeader.isPresent()) { + this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); + } else { + this.customClientIpHeader = OptionalNullable.absent(); + } + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage customClientIpHeader(String customClientIpHeader) { + this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); + return this; + } + + /** + *

The HTTP header to fetch the client's IP address

+ */ + @java.lang.Override + @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) + public _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader) { + this.customClientIpHeader = customClientIpHeader; + return this; + } + + @java.lang.Override + public _FinalStage verification(DomainVerification verification) { + this.verification = Optional.ofNullable(verification); + return this; + } + + @java.lang.Override + @JsonSetter(value = "verification", nulls = Nulls.SKIP) + public _FinalStage verification(Optional verification) { + this.verification = verification; + return this; + } + + /** + *

Intermediate address.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage originDomainName(String originDomainName) { + this.originDomainName = Optional.ofNullable(originDomainName); + return this; + } + + /** + *

Intermediate address.

+ */ + @java.lang.Override + @JsonSetter(value = "origin_domain_name", nulls = Nulls.SKIP) + public _FinalStage originDomainName(Optional originDomainName) { + this.originDomainName = originDomainName; + return this; + } + + /** + *

Whether this is the default custom domain (true) or not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDefault(Boolean isDefault) { + this.isDefault = Optional.ofNullable(isDefault); + return this; + } + + /** + *

Whether this is the default custom domain (true) or not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "is_default", nulls = Nulls.SKIP) + public _FinalStage isDefault(Optional isDefault) { + this.isDefault = isDefault; + return this; + } + + @java.lang.Override + public UpdateDefaultCustomDomainResponseContent build() { + return new UpdateDefaultCustomDomainResponseContent( + customDomainId, + domain, + primary, + isDefault, + status, + type, + originDomainName, + verification, + customClientIpHeader, + tlsPolicy, + domainMetadata, + certificate, + relyingPartyIdentifier, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultDomainResponseContent.java new file mode 100644 index 00000000..ab22c423 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultDomainResponseContent.java @@ -0,0 +1,99 @@ +/** + * 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.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = UpdateDefaultDomainResponseContent.Deserializer.class) +public final class UpdateDefaultDomainResponseContent { + private final Object value; + + private final int type; + + private UpdateDefaultDomainResponseContent(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((UpdateDefaultCustomDomainResponseContent) this.value); + } else if (this.type == 1) { + return visitor.visit((UpdateDefaultCanonicalDomainResponseContent) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateDefaultDomainResponseContent + && equalTo((UpdateDefaultDomainResponseContent) other); + } + + private boolean equalTo(UpdateDefaultDomainResponseContent other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static UpdateDefaultDomainResponseContent of(UpdateDefaultCustomDomainResponseContent value) { + return new UpdateDefaultDomainResponseContent(value, 0); + } + + public static UpdateDefaultDomainResponseContent of(UpdateDefaultCanonicalDomainResponseContent value) { + return new UpdateDefaultDomainResponseContent(value, 1); + } + + public interface Visitor { + T visit(UpdateDefaultCustomDomainResponseContent value); + + T visit(UpdateDefaultCanonicalDomainResponseContent value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(UpdateDefaultDomainResponseContent.class); + } + + @java.lang.Override + public UpdateDefaultDomainResponseContent deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, UpdateDefaultCustomDomainResponseContent.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, UpdateDefaultCanonicalDomainResponseContent.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java index 702afacc..7190a4cd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java @@ -25,14 +25,18 @@ public final class UpdateDirectoryProvisioningRequestContent { private final Optional synchronizeAutomatically; + private final Optional synchronizeGroups; + private final Map additionalProperties; private UpdateDirectoryProvisioningRequestContent( Optional> mapping, Optional synchronizeAutomatically, + Optional synchronizeGroups, Map additionalProperties) { this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; + this.synchronizeGroups = synchronizeGroups; this.additionalProperties = additionalProperties; } @@ -52,6 +56,11 @@ public Optional getSynchronizeAutomatically() { return synchronizeAutomatically; } + @JsonProperty("synchronize_groups") + public Optional getSynchronizeGroups() { + return synchronizeGroups; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -65,12 +74,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(UpdateDirectoryProvisioningRequestContent other) { - return mapping.equals(other.mapping) && synchronizeAutomatically.equals(other.synchronizeAutomatically); + return mapping.equals(other.mapping) + && synchronizeAutomatically.equals(other.synchronizeAutomatically) + && synchronizeGroups.equals(other.synchronizeGroups); } @java.lang.Override public int hashCode() { - return Objects.hash(this.mapping, this.synchronizeAutomatically); + return Objects.hash(this.mapping, this.synchronizeAutomatically, this.synchronizeGroups); } @java.lang.Override @@ -88,6 +99,8 @@ public static final class Builder { private Optional synchronizeAutomatically = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -96,6 +109,7 @@ private Builder() {} public Builder from(UpdateDirectoryProvisioningRequestContent other) { mapping(other.getMapping()); synchronizeAutomatically(other.getSynchronizeAutomatically()); + synchronizeGroups(other.getSynchronizeGroups()); return this; } @@ -127,9 +141,20 @@ public Builder synchronizeAutomatically(Boolean synchronizeAutomatically) { return this; } + @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) + public Builder synchronizeGroups(Optional synchronizeGroups) { + this.synchronizeGroups = synchronizeGroups; + return this; + } + + public Builder synchronizeGroups(String synchronizeGroups) { + this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); + return this; + } + public UpdateDirectoryProvisioningRequestContent build() { return new UpdateDirectoryProvisioningRequestContent( - mapping, synchronizeAutomatically, additionalProperties); + mapping, synchronizeAutomatically, synchronizeGroups, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java index 26991d9a..dd9ecff0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java @@ -34,6 +34,8 @@ public final class UpdateDirectoryProvisioningResponseContent { private final boolean synchronizeAutomatically; + private final Optional synchronizeGroups; + private final OffsetDateTime createdAt; private final OffsetDateTime updatedAt; @@ -52,6 +54,7 @@ private UpdateDirectoryProvisioningResponseContent( String strategy, List mapping, boolean synchronizeAutomatically, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -63,6 +66,7 @@ private UpdateDirectoryProvisioningResponseContent( this.strategy = strategy; this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; + this.synchronizeGroups = synchronizeGroups; this.createdAt = createdAt; this.updatedAt = updatedAt; this.lastSynchronizationAt = lastSynchronizationAt; @@ -111,6 +115,11 @@ public boolean getSynchronizeAutomatically() { return synchronizeAutomatically; } + @JsonProperty("synchronize_groups") + public Optional getSynchronizeGroups() { + return synchronizeGroups; + } + /** * @return The timestamp at which the directory provisioning configuration was created */ @@ -169,6 +178,7 @@ private boolean equalTo(UpdateDirectoryProvisioningResponseContent other) { && strategy.equals(other.strategy) && mapping.equals(other.mapping) && synchronizeAutomatically == other.synchronizeAutomatically + && synchronizeGroups.equals(other.synchronizeGroups) && createdAt.equals(other.createdAt) && updatedAt.equals(other.updatedAt) && lastSynchronizationAt.equals(other.lastSynchronizationAt) @@ -184,6 +194,7 @@ public int hashCode() { this.strategy, this.mapping, this.synchronizeAutomatically, + this.synchronizeGroups, this.createdAt, this.updatedAt, this.lastSynchronizationAt, @@ -260,6 +271,10 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); + _FinalStage synchronizeGroups(Optional synchronizeGroups); + + _FinalStage synchronizeGroups(String synchronizeGroups); + /** *

The timestamp at which the connection was last synchronized

*/ @@ -309,6 +324,8 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); + private List mapping = new ArrayList<>(); @JsonAnySetter @@ -323,6 +340,7 @@ public Builder from(UpdateDirectoryProvisioningResponseContent other) { strategy(other.getStrategy()); mapping(other.getMapping()); synchronizeAutomatically(other.getSynchronizeAutomatically()); + synchronizeGroups(other.getSynchronizeGroups()); createdAt(other.getCreatedAt()); updatedAt(other.getUpdatedAt()); lastSynchronizationAt(other.getLastSynchronizationAt()); @@ -463,6 +481,19 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz return this; } + @java.lang.Override + public _FinalStage synchronizeGroups(String synchronizeGroups) { + this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); + return this; + } + + @java.lang.Override + @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + this.synchronizeGroups = synchronizeGroups; + return this; + } + /** *

The mapping between Auth0 and IDP user attributes

* @return Reference to {@code this} so that method calls can be chained together. @@ -506,6 +537,7 @@ public UpdateDirectoryProvisioningResponseContent build() { strategy, mapping, synchronizeAutomatically, + synchronizeGroups, createdAt, updatedAt, lastSynchronizationAt, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowRequestContent.java index 7ad10966..2c3e74dc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowRequestContent.java @@ -3,7 +3,9 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -17,18 +19,21 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UpdateFlowRequestContent.Builder.class) public final class UpdateFlowRequestContent { private final Optional name; - private final Optional> actions; + private final OptionalNullable> actions; private final Map additionalProperties; private UpdateFlowRequestContent( - Optional name, Optional> actions, Map additionalProperties) { + Optional name, + OptionalNullable> actions, + Map additionalProperties) { this.name = name; this.actions = actions; this.additionalProperties = additionalProperties; @@ -39,8 +44,18 @@ public Optional getName() { return name; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("actions") - public Optional> getActions() { + public OptionalNullable> getActions() { + if (actions == null) { + return OptionalNullable.absent(); + } + return actions; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("actions") + private OptionalNullable> _getActions() { return actions; } @@ -77,7 +92,7 @@ public static Builder builder() { public static final class Builder { private Optional name = Optional.empty(); - private Optional> actions = Optional.empty(); + private OptionalNullable> actions = OptionalNullable.absent(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -102,13 +117,33 @@ public Builder name(String name) { } @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public Builder actions(Optional> actions) { + public Builder actions(@Nullable OptionalNullable> actions) { this.actions = actions; return this; } public Builder actions(List actions) { - this.actions = Optional.ofNullable(actions); + this.actions = OptionalNullable.of(actions); + return this; + } + + public Builder actions(Optional> actions) { + if (actions.isPresent()) { + this.actions = OptionalNullable.of(actions.get()); + } else { + this.actions = OptionalNullable.absent(); + } + return this; + } + + public Builder actions(com.auth0.client.mgmt.core.Nullable> actions) { + if (actions.isNull()) { + this.actions = OptionalNullable.ofNull(); + } else if (actions.isEmpty()) { + this.actions = OptionalNullable.absent(); + } else { + this.actions = OptionalNullable.of(actions.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java index 03420785..55fae2a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java @@ -46,7 +46,7 @@ public final class UpdateResourceServerRequestContent { private final OptionalNullable consentPolicy; - private final Optional> authorizationDetails; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -66,7 +66,7 @@ private UpdateResourceServerRequestContent( Optional enforcePolicies, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, - Optional> authorizationDetails, + OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, Map additionalProperties) { @@ -171,8 +171,12 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { + public OptionalNullable> getAuthorizationDetails() { + if (authorizationDetails == null) { + return OptionalNullable.absent(); + } return authorizationDetails; } @@ -202,6 +206,12 @@ private OptionalNullable _getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + private OptionalNullable> _getAuthorizationDetails() { + return authorizationDetails; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("proof_of_possession") private OptionalNullable _getProofOfPossession() { @@ -289,7 +299,7 @@ public static final class Builder { private OptionalNullable consentPolicy = OptionalNullable.absent(); - private Optional> authorizationDetails = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -505,13 +515,33 @@ public Builder consentPolicy( } @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { + public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; return this; } public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); + this.authorizationDetails = OptionalNullable.of(authorizationDetails); + return this; + } + + public Builder authorizationDetails(Optional> authorizationDetails) { + if (authorizationDetails.isPresent()) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } else { + this.authorizationDetails = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationDetails(com.auth0.client.mgmt.core.Nullable> authorizationDetails) { + if (authorizationDetails.isNull()) { + this.authorizationDetails = OptionalNullable.ofNull(); + } else if (authorizationDetails.isEmpty()) { + this.authorizationDetails = OptionalNullable.absent(); + } else { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java index 7759c0e0..8d06e593 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java @@ -54,7 +54,7 @@ public final class UpdateResourceServerResponseContent { private final OptionalNullable consentPolicy; - private final Optional> authorizationDetails; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -80,7 +80,7 @@ private UpdateResourceServerResponseContent( Optional tokenDialect, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, - Optional> authorizationDetails, + OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, Optional clientId, @@ -223,8 +223,12 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { + public OptionalNullable> getAuthorizationDetails() { + if (authorizationDetails == null) { + return OptionalNullable.absent(); + } return authorizationDetails; } @@ -262,6 +266,12 @@ private OptionalNullable _getConsentPolicy() { return consentPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + private OptionalNullable> _getAuthorizationDetails() { + return authorizationDetails; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("proof_of_possession") private OptionalNullable _getProofOfPossession() { @@ -367,7 +377,7 @@ public static final class Builder { private OptionalNullable consentPolicy = OptionalNullable.absent(); - private Optional> authorizationDetails = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -646,13 +656,33 @@ public Builder consentPolicy( } @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { + public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; return this; } public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); + this.authorizationDetails = OptionalNullable.of(authorizationDetails); + return this; + } + + public Builder authorizationDetails(Optional> authorizationDetails) { + if (authorizationDetails.isPresent()) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } else { + this.authorizationDetails = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationDetails(com.auth0.client.mgmt.core.Nullable> authorizationDetails) { + if (authorizationDetails.isNull()) { + this.authorizationDetails = OptionalNullable.ofNull(); + } else if (authorizationDetails.isEmpty()) { + this.authorizationDetails = OptionalNullable.absent(); + } else { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java index 22d9b9f9..9c451010 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java @@ -78,7 +78,7 @@ public final class UpdateTenantSettingsResponseContent { private final Optional customizeMfaInPostloginAction; - private final Optional> acrValuesSupported; + private final OptionalNullable> acrValuesSupported; private final OptionalNullable mtls; @@ -124,7 +124,7 @@ private UpdateTenantSettingsResponseContent( Optional oidcLogout, Optional allowOrganizationNameInAuthenticationApi, Optional customizeMfaInPostloginAction, - Optional> acrValuesSupported, + OptionalNullable> acrValuesSupported, OptionalNullable mtls, Optional pushedAuthorizationRequestsSupported, OptionalNullable authorizationResponseIssParameterSupported, @@ -391,8 +391,12 @@ public Optional getCustomizeMfaInPostloginAction() { /** * @return Supported ACR values */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("acr_values_supported") - public Optional> getAcrValuesSupported() { + public OptionalNullable> getAcrValuesSupported() { + if (acrValuesSupported == null) { + return OptionalNullable.absent(); + } return acrValuesSupported; } @@ -502,6 +506,12 @@ private OptionalNullable _getSessions() { return sessions; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("acr_values_supported") + private OptionalNullable> _getAcrValuesSupported() { + return acrValuesSupported; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("mtls") private OptionalNullable _getMtls() { @@ -676,7 +686,7 @@ public static final class Builder { private Optional customizeMfaInPostloginAction = Optional.empty(); - private Optional> acrValuesSupported = Optional.empty(); + private OptionalNullable> acrValuesSupported = OptionalNullable.absent(); private OptionalNullable mtls = OptionalNullable.absent(); @@ -1234,13 +1244,33 @@ public Builder customizeMfaInPostloginAction(Boolean customizeMfaInPostloginActi *

Supported ACR values

*/ @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) - public Builder acrValuesSupported(Optional> acrValuesSupported) { + public Builder acrValuesSupported(@Nullable OptionalNullable> acrValuesSupported) { this.acrValuesSupported = acrValuesSupported; return this; } public Builder acrValuesSupported(List acrValuesSupported) { - this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported); + return this; + } + + public Builder acrValuesSupported(Optional> acrValuesSupported) { + if (acrValuesSupported.isPresent()) { + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported.get()); + } else { + this.acrValuesSupported = OptionalNullable.absent(); + } + return this; + } + + public Builder acrValuesSupported(com.auth0.client.mgmt.core.Nullable> acrValuesSupported) { + if (acrValuesSupported.isNull()) { + this.acrValuesSupported = OptionalNullable.ofNull(); + } else if (acrValuesSupported.isEmpty()) { + this.acrValuesSupported = OptionalNullable.absent(); + } else { + this.acrValuesSupported = OptionalNullable.of(acrValuesSupported.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UserGroupsResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/UserGroupsResponseSchema.java index 4adb8d5a..9991515e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserGroupsResponseSchema.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserGroupsResponseSchema.java @@ -3,9 +3,7 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -19,7 +17,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UserGroupsResponseSchema.Builder.class) @@ -32,12 +29,8 @@ public final class UserGroupsResponseSchema implements IGroup { private final Optional connectionId; - private final OptionalNullable organizationId; - private final Optional tenantName; - private final OptionalNullable description; - private final Optional createdAt; private final Optional updatedAt; @@ -51,9 +44,7 @@ private UserGroupsResponseSchema( Optional name, Optional externalId, Optional connectionId, - OptionalNullable organizationId, Optional tenantName, - OptionalNullable description, Optional createdAt, Optional updatedAt, Optional membershipCreatedAt, @@ -62,9 +53,7 @@ private UserGroupsResponseSchema( this.name = name; this.externalId = externalId; this.connectionId = connectionId; - this.organizationId = organizationId; this.tenantName = tenantName; - this.description = description; this.createdAt = createdAt; this.updatedAt = updatedAt; this.membershipCreatedAt = membershipCreatedAt; @@ -81,7 +70,7 @@ public Optional getId() { } /** - * @return Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters. + * @return Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters. */ @JsonProperty("name") @java.lang.Override @@ -107,19 +96,6 @@ public Optional getConnectionId() { return connectionId; } - /** - * @return Identifier for the organization this group belongs to (if an organization group). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - @java.lang.Override - public OptionalNullable getOrganizationId() { - if (organizationId == null) { - return OptionalNullable.absent(); - } - return organizationId; - } - /** * @return Identifier for the tenant this group belongs to. */ @@ -129,16 +105,6 @@ public Optional getTenantName() { return tenantName; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - @java.lang.Override - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - /** * @return Timestamp of when the group was created. */ @@ -165,18 +131,6 @@ public Optional getMembershipCreatedAt() { return membershipCreatedAt; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - private OptionalNullable _getOrganizationId() { - return organizationId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - private OptionalNullable _getDescription() { - return description; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -193,9 +147,7 @@ private boolean equalTo(UserGroupsResponseSchema other) { && name.equals(other.name) && externalId.equals(other.externalId) && connectionId.equals(other.connectionId) - && organizationId.equals(other.organizationId) && tenantName.equals(other.tenantName) - && description.equals(other.description) && createdAt.equals(other.createdAt) && updatedAt.equals(other.updatedAt) && membershipCreatedAt.equals(other.membershipCreatedAt); @@ -208,9 +160,7 @@ public int hashCode() { this.name, this.externalId, this.connectionId, - this.organizationId, this.tenantName, - this.description, this.createdAt, this.updatedAt, this.membershipCreatedAt); @@ -235,12 +185,8 @@ public static final class Builder { private Optional connectionId = Optional.empty(); - private OptionalNullable organizationId = OptionalNullable.absent(); - private Optional tenantName = Optional.empty(); - private OptionalNullable description = OptionalNullable.absent(); - private Optional createdAt = Optional.empty(); private Optional updatedAt = Optional.empty(); @@ -257,9 +203,7 @@ public Builder from(UserGroupsResponseSchema other) { name(other.getName()); externalId(other.getExternalId()); connectionId(other.getConnectionId()); - organizationId(other.getOrganizationId()); tenantName(other.getTenantName()); - description(other.getDescription()); createdAt(other.getCreatedAt()); updatedAt(other.getUpdatedAt()); membershipCreatedAt(other.getMembershipCreatedAt()); @@ -281,7 +225,7 @@ public Builder id(String id) { } /** - *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

+ *

Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

*/ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { @@ -322,40 +266,6 @@ public Builder connectionId(String connectionId) { return this; } - /** - *

Identifier for the organization this group belongs to (if an organization group).

- */ - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public Builder organizationId(@Nullable OptionalNullable organizationId) { - this.organizationId = organizationId; - return this; - } - - public Builder organizationId(String organizationId) { - this.organizationId = OptionalNullable.of(organizationId); - return this; - } - - public Builder organizationId(Optional organizationId) { - if (organizationId.isPresent()) { - this.organizationId = OptionalNullable.of(organizationId.get()); - } else { - this.organizationId = OptionalNullable.absent(); - } - return this; - } - - public Builder organizationId(com.auth0.client.mgmt.core.Nullable organizationId) { - if (organizationId.isNull()) { - this.organizationId = OptionalNullable.ofNull(); - } else if (organizationId.isEmpty()) { - this.organizationId = OptionalNullable.absent(); - } else { - this.organizationId = OptionalNullable.of(organizationId.get()); - } - return this; - } - /** *

Identifier for the tenant this group belongs to.

*/ @@ -370,37 +280,6 @@ public Builder tenantName(String tenantName) { return this; } - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public Builder description(@Nullable OptionalNullable description) { - this.description = description; - return this; - } - - public Builder description(String description) { - this.description = OptionalNullable.of(description); - return this; - } - - public Builder description(Optional description) { - if (description.isPresent()) { - this.description = OptionalNullable.of(description.get()); - } else { - this.description = OptionalNullable.absent(); - } - return this; - } - - public Builder description(com.auth0.client.mgmt.core.Nullable description) { - if (description.isNull()) { - this.description = OptionalNullable.ofNull(); - } else if (description.isEmpty()) { - this.description = OptionalNullable.absent(); - } else { - this.description = OptionalNullable.of(description.get()); - } - return this; - } - /** *

Timestamp of when the group was created.

*/ @@ -449,9 +328,7 @@ public UserGroupsResponseSchema build() { name, externalId, connectionId, - organizationId, tenantName, - description, createdAt, updatedAt, membershipCreatedAt, diff --git a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java index 68e7ab36..48191e53 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java @@ -76,7 +76,6 @@ public void testCreate() throws Exception { "{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); CreateClientGrantResponseContent response = client.clientGrants() .create(CreateClientGrantRequestContent.builder() - .clientId("client_id") .audience("audience") .build()); RecordedRequest request = server.takeRequest(); @@ -84,8 +83,7 @@ public void testCreate() throws Exception { Assertions.assertEquals("POST", request.getMethod()); // Validate request body String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = - "" + "{\n" + " \"client_id\": \"client_id\",\n" + " \"audience\": \"audience\"\n" + "}"; + String expectedRequestBody = "" + "{\n" + " \"audience\": \"audience\"\n" + "}"; JsonNode actualJson = objectMapper.readTree(actualRequestBody); JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java index 0e4130d2..5bfa3666 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java @@ -45,7 +45,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"directory_provisionings\":[{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}],\"next\":\"next\"}")); + "{\"directory_provisionings\":[{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}],\"next\":\"next\"}")); SyncPagingIterable response = client.connections() .directoryProvisioning() .list(ListDirectoryProvisioningsRequestParameters.builder() @@ -68,7 +68,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); + "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); GetDirectoryProvisioningResponseContent response = client.connections().directoryProvisioning().get("id"); RecordedRequest request = server.takeRequest(); @@ -90,6 +90,7 @@ public void testGet() throws Exception { + " }\n" + " ],\n" + " \"synchronize_automatically\": true,\n" + + " \"synchronize_groups\": \"synchronize_groups\",\n" + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" @@ -133,7 +134,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); + "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); CreateDirectoryProvisioningResponseContent response = client.connections().directoryProvisioning().create("id", OptionalNullable.absent()); RecordedRequest request = server.takeRequest(); @@ -155,6 +156,7 @@ public void testCreate() throws Exception { + " }\n" + " ],\n" + " \"synchronize_automatically\": true,\n" + + " \"synchronize_groups\": \"synchronize_groups\",\n" + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" @@ -207,7 +209,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); + "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); UpdateDirectoryProvisioningResponseContent response = client.connections().directoryProvisioning().update("id", OptionalNullable.absent()); RecordedRequest request = server.takeRequest(); @@ -229,6 +231,7 @@ public void testUpdate() throws Exception { + " }\n" + " ],\n" + " \"synchronize_automatically\": true,\n" + + " \"synchronize_groups\": \"synchronize_groups\",\n" + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" diff --git a/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java b/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java index 5262d076..6e2855a2 100644 --- a/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java @@ -7,10 +7,13 @@ import com.auth0.client.mgmt.types.CustomDomain; import com.auth0.client.mgmt.types.CustomDomainProvisioningTypeEnum; import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; +import com.auth0.client.mgmt.types.GetDefaultDomainResponseContent; import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; +import com.auth0.client.mgmt.types.SetDefaultCustomDomainRequestContent; import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; +import com.auth0.client.mgmt.types.UpdateDefaultDomainResponseContent; import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -242,6 +245,196 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testGetDefault() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"custom_domain_id\":\"custom_domain_id\",\"domain\":\"domain\",\"primary\":true,\"is_default\":true,\"status\":\"pending_verification\",\"type\":\"auth0_managed_certs\",\"origin_domain_name\":\"origin_domain_name\",\"verification\":{\"methods\":[{\"name\":\"cname\",\"record\":\"record\"}],\"status\":\"verified\",\"error_msg\":\"error_msg\",\"last_verified_at\":\"last_verified_at\"},\"custom_client_ip_header\":\"custom_client_ip_header\",\"tls_policy\":\"tls_policy\",\"domain_metadata\":{\"key\":\"value\"},\"certificate\":{\"status\":\"provisioning\",\"error_msg\":\"error_msg\",\"certificate_authority\":\"letsencrypt\",\"renews_before\":\"renews_before\"},\"relying_party_identifier\":\"relying_party_identifier\"}")); + GetDefaultDomainResponseContent response = client.customDomains().getDefault(); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + + "{\n" + + " \"custom_domain_id\": \"custom_domain_id\",\n" + + " \"domain\": \"domain\",\n" + + " \"primary\": true,\n" + + " \"is_default\": true,\n" + + " \"status\": \"pending_verification\",\n" + + " \"type\": \"auth0_managed_certs\",\n" + + " \"origin_domain_name\": \"origin_domain_name\",\n" + + " \"verification\": {\n" + + " \"methods\": [\n" + + " {\n" + + " \"name\": \"cname\",\n" + + " \"record\": \"record\"\n" + + " }\n" + + " ],\n" + + " \"status\": \"verified\",\n" + + " \"error_msg\": \"error_msg\",\n" + + " \"last_verified_at\": \"last_verified_at\"\n" + + " },\n" + + " \"custom_client_ip_header\": \"custom_client_ip_header\",\n" + + " \"tls_policy\": \"tls_policy\",\n" + + " \"domain_metadata\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"certificate\": {\n" + + " \"status\": \"provisioning\",\n" + + " \"error_msg\": \"error_msg\",\n" + + " \"certificate_authority\": \"letsencrypt\",\n" + + " \"renews_before\": \"renews_before\"\n" + + " },\n" + + " \"relying_party_identifier\": \"relying_party_identifier\"\n" + + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + + @Test + public void testSetDefault() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"custom_domain_id\":\"custom_domain_id\",\"domain\":\"domain\",\"primary\":true,\"is_default\":true,\"status\":\"pending_verification\",\"type\":\"auth0_managed_certs\",\"origin_domain_name\":\"origin_domain_name\",\"verification\":{\"methods\":[{\"name\":\"cname\",\"record\":\"record\"}],\"status\":\"verified\",\"error_msg\":\"error_msg\",\"last_verified_at\":\"last_verified_at\"},\"custom_client_ip_header\":\"custom_client_ip_header\",\"tls_policy\":\"tls_policy\",\"domain_metadata\":{\"key\":\"value\"},\"certificate\":{\"status\":\"provisioning\",\"error_msg\":\"error_msg\",\"certificate_authority\":\"letsencrypt\",\"renews_before\":\"renews_before\"},\"relying_party_identifier\":\"relying_party_identifier\"}")); + UpdateDefaultDomainResponseContent response = client.customDomains() + .setDefault(SetDefaultCustomDomainRequestContent.builder() + .domain("domain") + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"domain\": \"domain\"\n" + "}"; + JsonNode actualJson = objectMapper.readTree(actualRequestBody); + JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); + Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); + if (actualJson.has("type") || actualJson.has("_type") || actualJson.has("kind")) { + String discriminator = null; + if (actualJson.has("type")) discriminator = actualJson.get("type").asText(); + else if (actualJson.has("_type")) + discriminator = actualJson.get("_type").asText(); + else if (actualJson.has("kind")) + discriminator = actualJson.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualJson.isNull()) { + Assertions.assertTrue( + actualJson.isObject() || actualJson.isArray() || actualJson.isValueNode(), + "request should be a valid JSON value"); + } + + if (actualJson.isArray()) { + Assertions.assertTrue(actualJson.size() >= 0, "Array should have valid size"); + } + if (actualJson.isObject()) { + Assertions.assertTrue(actualJson.size() >= 0, "Object should have valid field count"); + } + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + + "{\n" + + " \"custom_domain_id\": \"custom_domain_id\",\n" + + " \"domain\": \"domain\",\n" + + " \"primary\": true,\n" + + " \"is_default\": true,\n" + + " \"status\": \"pending_verification\",\n" + + " \"type\": \"auth0_managed_certs\",\n" + + " \"origin_domain_name\": \"origin_domain_name\",\n" + + " \"verification\": {\n" + + " \"methods\": [\n" + + " {\n" + + " \"name\": \"cname\",\n" + + " \"record\": \"record\"\n" + + " }\n" + + " ],\n" + + " \"status\": \"verified\",\n" + + " \"error_msg\": \"error_msg\",\n" + + " \"last_verified_at\": \"last_verified_at\"\n" + + " },\n" + + " \"custom_client_ip_header\": \"custom_client_ip_header\",\n" + + " \"tls_policy\": \"tls_policy\",\n" + + " \"domain_metadata\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"certificate\": {\n" + + " \"status\": \"provisioning\",\n" + + " \"error_msg\": \"error_msg\",\n" + + " \"certificate_authority\": \"letsencrypt\",\n" + + " \"renews_before\": \"renews_before\"\n" + + " },\n" + + " \"relying_party_identifier\": \"relying_party_identifier\"\n" + + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + @Test public void testGet() throws Exception { server.enqueue( diff --git a/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java index 54cf1e86..c69e464b 100644 --- a/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java @@ -42,7 +42,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"organization_id\":\"organization_id\",\"tenant_name\":\"tenant_name\",\"description\":\"description\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\",\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); + "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"tenant_name\":\"tenant_name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\",\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); SyncPagingIterable response = client.groups() .list(ListGroupsRequestParameters.builder() .connectionId(OptionalNullable.of("connection_id")) @@ -69,7 +69,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"organization_id\":\"organization_id\",\"tenant_name\":\"tenant_name\",\"description\":\"description\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + "{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"tenant_name\":\"tenant_name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); GetGroupResponseContent response = client.groups().get("id"); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -84,9 +84,7 @@ public void testGet() throws Exception { + " \"name\": \"name\",\n" + " \"external_id\": \"external_id\",\n" + " \"connection_id\": \"connection_id\",\n" - + " \"organization_id\": \"organization_id\",\n" + " \"tenant_name\": \"tenant_name\",\n" - + " \"description\": \"description\",\n" + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" + "}"; diff --git a/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java index 3113a441..00a0e231 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java @@ -41,7 +41,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"organization_id\":\"organization_id\",\"tenant_name\":\"tenant_name\",\"description\":\"description\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"membership_created_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\",\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); + "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"tenant_name\":\"tenant_name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"membership_created_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\",\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); SyncPagingIterable response = client.users() .groups() .get(