From 692f61d821b96d42bad37db8e5c15e93ea82f893 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 10:50:05 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.11.1 --- reference.md | 193 +++++++++- .../auth0/client/mgmt/AsyncClientsClient.java | 16 +- .../client/mgmt/AsyncConnectionsClient.java | 8 +- .../client/mgmt/AsyncRawClientsClient.java | 16 +- .../mgmt/AsyncRawConnectionsClient.java | 8 +- .../client/mgmt/AsyncRawFlowsClient.java | 11 + .../client/mgmt/AsyncRawFormsClient.java | 10 + .../com/auth0/client/mgmt/ClientsClient.java | 16 +- .../auth0/client/mgmt/ConnectionsClient.java | 8 +- .../auth0/client/mgmt/RawClientsClient.java | 16 +- .../client/mgmt/RawConnectionsClient.java | 8 +- .../com/auth0/client/mgmt/RawFlowsClient.java | 7 + .../com/auth0/client/mgmt/RawFormsClient.java | 6 + .../mgmt/flows/AsyncRawExecutionsClient.java | 11 + .../mgmt/flows/RawExecutionsClient.java | 7 + .../client/mgmt/keys/AsyncKeysClient.java | 7 + .../mgmt/keys/AsyncNetworkAclsClient.java | 73 ++++ .../mgmt/keys/AsyncRawNetworkAclsClient.java | 363 ++++++++++++++++++ .../auth0/client/mgmt/keys/KeysClient.java | 7 + .../client/mgmt/keys/NetworkAclsClient.java | 72 ++++ .../mgmt/keys/RawNetworkAclsClient.java | 283 ++++++++++++++ .../CreateKeysNetworkAclsRequestContent.java | 185 +++++++++ ...irdPartyClientAccessAllowedValuesEnum.java | 89 +++++ ...hirdPartyClientAccessDefaultValueEnum.java | 78 ++++ ...lientMyOrganizationPatchConfiguration.java | 37 ++ ...ClientMyOrganizationPostConfiguration.java | 37 ++ ...ntMyOrganizationResponseConfiguration.java | 37 ++ ...onThirdPartyClientAccessConfiguration.java | 193 ++++++++++ .../types/ConnectionOptionsCommonOidc.java | 37 +- .../mgmt/types/ConnectionOptionsOidc.java | 33 ++ .../mgmt/types/ConnectionOptionsOkta.java | 33 ++ .../client/mgmt/types/ConnectionProfile.java | 31 +- ...ctionProfileCrossAppAccessResourceApp.java | 120 ++++++ ...rofileCrossAppAccessResourceAppStatus.java | 160 ++++++++ ...cessResourceAppStatusDefaultValueEnum.java | 87 +++++ ...ssAppAccessResourceAppStatusValueEnum.java | 87 +++++ .../types/ConnectionPropertiesOptions.java | 26 ++ ...CreateConnectionProfileRequestContent.java | 39 +- ...reateConnectionProfileResponseContent.java | 31 +- .../CreateCustomDomainRequestContent.java | 22 +- .../CreateKeysNetworkAclsResponseContent.java | 293 ++++++++++++++ .../types/FlowActionFlowMapValueParams.java | 54 ++- .../GetAllKeysNetworkAclsResponseContent.java | 123 ++++++ .../GetConnectionProfileResponseContent.java | 31 +- .../types/GetRefreshTokenResponseContent.java | 168 ++++++-- .../mgmt/types/GetSessionResponseContent.java | 252 ++++++++++-- .../types/IConnectionOptionsCommonOidc.java | 2 + .../client/mgmt/types/NetworkAclKey.java | 291 ++++++++++++++ .../types/NetworkAclKeyAlgorithmEnum.java | 75 ++++ .../client/mgmt/types/NetworkAclRule.java | 34 +- .../auth0/client/mgmt/types/OauthScope.java | 22 ++ .../types/RefreshTokenResponseContent.java | 168 ++++++-- .../types/SessionAuthenticationSignal.java | 45 ++- .../mgmt/types/SessionResponseContent.java | 252 ++++++++++-- .../mgmt/types/UpdateConnectionOptions.java | 26 ++ ...UpdateConnectionProfileRequestContent.java | 31 +- ...pdateConnectionProfileResponseContent.java | 31 +- .../UpdateCustomDomainRequestContent.java | 21 +- .../mgmt/types/UpdateFormRequestContent.java | 94 ++++- .../UpdateRefreshTokenResponseContent.java | 168 ++++++-- ...pdateSelfServiceProfileRequestContent.java | 11 +- .../types/UpdateSessionResponseContent.java | 252 ++++++++++-- ...ateUserAttributeProfileRequestContent.java | 15 +- .../mgmt/ConnectionProfilesWireTest.java | 2 +- .../client/mgmt/KeysNetworkAclsWireTest.java | 280 ++++++++++++++ .../ClientsWireTest_testCreate_response.json | 6 + .../ClientsWireTest_testGet_response.json | 6 + ...ntsWireTest_testRotateSecret_response.json | 6 + .../ClientsWireTest_testUpdate_response.json | 6 + ...nProfilesWireTest_testCreate_response.json | 8 + ...tionProfilesWireTest_testGet_response.json | 8 + ...nProfilesWireTest_testUpdate_response.json | 8 + .../NetworkAclsWireTest_testGet_response.json | 1 + .../NetworkAclsWireTest_testSet_response.json | 1 + ...tworkAclsWireTest_testUpdate_response.json | 1 + 75 files changed, 5009 insertions(+), 291 deletions(-) create mode 100644 src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/keys/types/CreateKeysNetworkAclsRequestContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationThirdPartyClientAccessConfiguration.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceApp.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatus.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatusValueEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/CreateKeysNetworkAclsResponseContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/GetAllKeysNetworkAclsResponseContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/NetworkAclKey.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/NetworkAclKeyAlgorithmEnum.java create mode 100644 src/test/java/com/auth0/client/mgmt/KeysNetworkAclsWireTest.java diff --git a/reference.md b/reference.md index e9bb0d751..9d82c8d1d 100644 --- a/reference.md +++ b/reference.md @@ -1527,7 +1527,7 @@ For more information, read [Applications in Auth0](https://www.auth0.com/docs/ge `jwt_configuration.lifetime_in_seconds`, `jwt_configuration.secret_encoded`, `jwt_configuration.scopes`, `jwt_configuration.alg`, `api_type`, `logo_uri`, `allowed_clients`, `owners`, `custom_login_page`, - `custom_login_page_off`, `sso`, `addons`, `form_template`, + `custom_login_page_on`, `sso`, `addons`, `form_template`, `custom_login_page_codeview`, `resource_servers`, `client_metadata`, `mobile`, `mobile.android`, `mobile.ios`, `allowed_logout_urls`, `token_endpoint_auth_method`, `is_first_party`, `oidc_conformant`, @@ -2339,7 +2339,7 @@ For more information, read [Applications in Auth0](https://www.auth0.com/docs/ge `jwt_configuration.lifetime_in_seconds`, `jwt_configuration.secret_encoded`, `jwt_configuration.scopes`, `jwt_configuration.alg`, `api_type`, `logo_uri`, `allowed_clients`, `owners`, `custom_login_page`, - `custom_login_page_off`, `sso`, `addons`, `form_template`, + `custom_login_page_on`, `sso`, `addons`, `form_template`, `custom_login_page_codeview`, `resource_servers`, `client_metadata`, `mobile`, `mobile.android`, `mobile.ios`, `allowed_logout_urls`, `token_endpoint_auth_method`, `is_first_party`, `oidc_conformant`, @@ -3203,6 +3203,14 @@ client.connectionProfiles().create( **strategyOverrides:** `Optional` + + + +
+
+ +**crossAppAccessResourceApp:** `Optional` +
@@ -3511,6 +3519,14 @@ client.connectionProfiles().update( **strategyOverrides:** `Optional` + + + +
+
+ +**crossAppAccessResourceApp:** `Optional` +
@@ -3958,7 +3974,7 @@ client.connections().delete("id"); Update details for a specific [connection](https://auth0.com/docs/authenticate/identity-providers), including option properties for identity provider configuration. -**Note**: If you use the `options` parameter, the entire `options` object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. +**Note**: If you use the `options` parameter, the entire `options` object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value. @@ -25376,6 +25392,177 @@ client.keys().encryption().createPublicWrappingKey("kid"); + + + + +## Keys NetworkAcls +
client.keys.networkAcls.list() -> GetAllKeysNetworkAclsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.keys().networkAcls().list(); +``` +
+
+
+
+ + +
+
+
+ +
client.keys.networkAcls.create(request) -> CreateKeysNetworkAclsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new key used to verify HTTP Message Signatures on Network ACL rules. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.keys().networkAcls().create( + CreateKeysNetworkAclsRequestContent + .builder() + .name("name") + .alg(NetworkAclKeyAlgorithmEnum.HMAC_SHA256) + .value("value") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `String` — Customer-supplied label with no cryptographic meaning. Must be unique across all Network ACL keys for the tenant. + +
+
+ +
+
+ +**alg:** `NetworkAclKeyAlgorithmEnum` + +
+
+ +
+
+ +**value:** `String` — Base64-encoded raw key material. Constraints on the decoded value depend on the algorithm specified. Currently only HMAC-SHA256 is supported. + +
+
+
+
+ + +
+
+
+ +
client.keys.networkAcls.get(id) -> NetworkAclKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.keys().networkAcls().get("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the Network ACL Key to retrieve. + +
+
+
+
+ +
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java index 2a927520c..5b19233b4 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java @@ -62,7 +62,7 @@ public AsyncRawClientsClient withRawResponse() { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -94,7 +94,7 @@ public CompletableFuture> list() { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -126,7 +126,7 @@ public CompletableFuture> list(RequestOptions request * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -158,7 +158,7 @@ public CompletableFuture> list(ListClientsRequestPara * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -288,7 +288,7 @@ public CompletableFuture registerCimdClient( * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -319,7 +319,7 @@ public CompletableFuture get(String id) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -350,7 +350,7 @@ public CompletableFuture get(String id, RequestOptions * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -381,7 +381,7 @@ public CompletableFuture get(String id, GetClientReque * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, diff --git a/src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java index 025ee1b27..045a4e661 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java @@ -200,7 +200,7 @@ public CompletableFuture delete(String id, RequestOptions requestOptions) /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture update(String id) { return this.rawClient.update(id).thenApply(response -> response.body()); @@ -208,7 +208,7 @@ public CompletableFuture update(String id) { /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture update(String id, RequestOptions requestOptions) { return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); @@ -216,7 +216,7 @@ public CompletableFuture update(String id, Requ /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture update( String id, UpdateConnectionRequestContent request) { @@ -225,7 +225,7 @@ public CompletableFuture update( /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture update( String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java index 5690f51c8..cfabfe83f 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java @@ -72,7 +72,7 @@ public AsyncRawClientsClient(ClientOptions clientOptions) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -104,7 +104,7 @@ public CompletableFuture>> * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -137,7 +137,7 @@ public CompletableFuture>> * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -170,7 +170,7 @@ public CompletableFuture>> * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -728,7 +728,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -759,7 +759,7 @@ public CompletableFuture> ge * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -791,7 +791,7 @@ public CompletableFuture> ge * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -823,7 +823,7 @@ public CompletableFuture> ge * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java index 727b1c68a..c8fb3f587 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java @@ -603,7 +603,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture> update(String id) { return update(id, UpdateConnectionRequestContent.builder().build()); @@ -611,7 +611,7 @@ public CompletableFutureconnection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture> update( String id, RequestOptions requestOptions) { @@ -620,7 +620,7 @@ public CompletableFutureconnection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture> update( String id, UpdateConnectionRequestContent request) { @@ -629,7 +629,7 @@ public CompletableFutureconnection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public CompletableFuture> update( String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java index 15f60c3f4..298886a76 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -461,6 +462,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -557,6 +563,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO } try { switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 401: future.completeExceptionally(new UnauthorizedError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java index fc42a3250..54ea648e3 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java @@ -548,6 +548,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO } try { switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 401: future.completeExceptionally(new UnauthorizedError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -558,6 +563,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/ClientsClient.java b/src/main/java/com/auth0/client/mgmt/ClientsClient.java index 2e5dc6819..897251242 100644 --- a/src/main/java/com/auth0/client/mgmt/ClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/ClientsClient.java @@ -61,7 +61,7 @@ public RawClientsClient withRawResponse() { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -93,7 +93,7 @@ public SyncPagingIterable list() { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -125,7 +125,7 @@ public SyncPagingIterable list(RequestOptions requestOptions) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -157,7 +157,7 @@ public SyncPagingIterable list(ListClientsRequestParameters request) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -283,7 +283,7 @@ public RegisterCimdClientResponseContent registerCimdClient( * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -314,7 +314,7 @@ public GetClientResponseContent get(String id) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -345,7 +345,7 @@ public GetClientResponseContent get(String id, RequestOptions requestOptions) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -376,7 +376,7 @@ public GetClientResponseContent get(String id, GetClientRequestParameters reques * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, diff --git a/src/main/java/com/auth0/client/mgmt/ConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/ConnectionsClient.java index 4e71232ce..4cdae7536 100644 --- a/src/main/java/com/auth0/client/mgmt/ConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/ConnectionsClient.java @@ -199,7 +199,7 @@ public void delete(String id, RequestOptions requestOptions) { /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public UpdateConnectionResponseContent update(String id) { return this.rawClient.update(id).body(); @@ -207,7 +207,7 @@ public UpdateConnectionResponseContent update(String id) { /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public UpdateConnectionResponseContent update(String id, RequestOptions requestOptions) { return this.rawClient.update(id, requestOptions).body(); @@ -215,7 +215,7 @@ public UpdateConnectionResponseContent update(String id, RequestOptions requestO /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public UpdateConnectionResponseContent update(String id, UpdateConnectionRequestContent request) { return this.rawClient.update(id, request).body(); @@ -223,7 +223,7 @@ public UpdateConnectionResponseContent update(String id, UpdateConnectionRequest /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public UpdateConnectionResponseContent update( String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/RawClientsClient.java b/src/main/java/com/auth0/client/mgmt/RawClientsClient.java index 8daab136f..956bf4552 100644 --- a/src/main/java/com/auth0/client/mgmt/RawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawClientsClient.java @@ -67,7 +67,7 @@ public RawClientsClient(ClientOptions clientOptions) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -99,7 +99,7 @@ public ManagementApiHttpResponse> list() { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -131,7 +131,7 @@ public ManagementApiHttpResponse> list(RequestOptions * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -163,7 +163,7 @@ public ManagementApiHttpResponse> list(ListClientsReq * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -614,7 +614,7 @@ public ManagementApiHttpResponse registerCimd * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -645,7 +645,7 @@ public ManagementApiHttpResponse get(String id) { * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -676,7 +676,7 @@ public ManagementApiHttpResponse get(String id, Reques * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, @@ -707,7 +707,7 @@ public ManagementApiHttpResponse get(String id, GetCli * jwt_configuration.lifetime_in_seconds, jwt_configuration.secret_encoded, * jwt_configuration.scopes, jwt_configuration.alg, api_type, * logo_uri, allowed_clients, owners, custom_login_page, - * custom_login_page_off, sso, addons, form_template, + * custom_login_page_on, sso, addons, form_template, * custom_login_page_codeview, resource_servers, client_metadata, * mobile, mobile.android, mobile.ios, allowed_logout_urls, * token_endpoint_auth_method, is_first_party, oidc_conformant, diff --git a/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java index 62341fdc8..c60e8e784 100644 --- a/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java @@ -491,7 +491,7 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public ManagementApiHttpResponse update(String id) { return update(id, UpdateConnectionRequestContent.builder().build()); @@ -499,7 +499,7 @@ public ManagementApiHttpResponse update(String /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) { return update(id, UpdateConnectionRequestContent.builder().build(), requestOptions); @@ -507,7 +507,7 @@ public ManagementApiHttpResponse update(String /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public ManagementApiHttpResponse update( String id, UpdateConnectionRequestContent request) { @@ -516,7 +516,7 @@ public ManagementApiHttpResponse update( /** * Update details for a specific connection, including option properties for identity provider configuration. - *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option.

+ *

Note: If you use the options parameter, the entire options object is overridden. To avoid partial data or other issues, ensure all parameters are present when using this option. If any options are unspecified, the default will be used, even if it differs from the existing value.

*/ public ManagementApiHttpResponse update( String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java b/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java index 7a0eec1ad..7c4c06717 100644 --- a/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -362,6 +363,9 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO case 404: throw new NotFoundError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -439,6 +443,9 @@ public ManagementApiHttpResponse update( } try { switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 401: throw new UnauthorizedError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/RawFormsClient.java b/src/main/java/com/auth0/client/mgmt/RawFormsClient.java index 247f46d47..0ab1c4540 100644 --- a/src/main/java/com/auth0/client/mgmt/RawFormsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawFormsClient.java @@ -432,12 +432,18 @@ public ManagementApiHttpResponse update( } try { switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 401: throw new UnauthorizedError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java index 61111e90c..b45c9c3dd 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.flows.types.GetFlowExecutionRequestParameters; @@ -145,6 +146,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -261,6 +267,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java index 91db83482..78887a5df 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.flows.types.GetFlowExecutionRequestParameters; @@ -123,6 +124,9 @@ public ManagementApiHttpResponse> list( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -214,6 +218,9 @@ public ManagementApiHttpResponse get( case 403: throw new ForbiddenError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncKeysClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncKeysClient.java index 8823269ff..3523ec44d 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncKeysClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncKeysClient.java @@ -14,12 +14,15 @@ public class AsyncKeysClient { protected final Supplier encryptionClient; + protected final Supplier networkAclsClient; + protected final Supplier signingClient; public AsyncKeysClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.customSigningClient = Suppliers.memoize(() -> new AsyncCustomSigningClient(clientOptions)); this.encryptionClient = Suppliers.memoize(() -> new AsyncEncryptionClient(clientOptions)); + this.networkAclsClient = Suppliers.memoize(() -> new AsyncNetworkAclsClient(clientOptions)); this.signingClient = Suppliers.memoize(() -> new AsyncSigningClient(clientOptions)); } @@ -31,6 +34,10 @@ public AsyncEncryptionClient encryption() { return this.encryptionClient.get(); } + public AsyncNetworkAclsClient networkAcls() { + return this.networkAclsClient.get(); + } + public AsyncSigningClient signing() { return this.signingClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java new file mode 100644 index 000000000..5812859ac --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java @@ -0,0 +1,73 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.keys; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.keys.types.CreateKeysNetworkAclsRequestContent; +import com.auth0.client.mgmt.types.CreateKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.GetAllKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.NetworkAclKey; +import java.util.concurrent.CompletableFuture; + +public class AsyncNetworkAclsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawNetworkAclsClient rawClient; + + public AsyncNetworkAclsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawNetworkAclsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawNetworkAclsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public CompletableFuture list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public CompletableFuture list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).thenApply(response -> response.body()); + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture create(CreateKeysNetworkAclsRequestContent request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture create( + CreateKeysNetworkAclsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture get(String id) { + return this.rawClient.get(id).thenApply(response -> response.body()); + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java new file mode 100644 index 000000000..dba3eddbc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java @@ -0,0 +1,363 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.keys; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.keys.types.CreateKeysNetworkAclsRequestContent; +import com.auth0.client.mgmt.types.CreateKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.GetAllKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.NetworkAclKey; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawNetworkAclsClient { + protected final ClientOptions clientOptions; + + public AsyncRawNetworkAclsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public CompletableFuture> list() { + return list(null); + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public CompletableFuture> list( + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, GetAllKeysNetworkAclsResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture> create( + CreateKeysNetworkAclsRequestContent request) { + return create(request, null); + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture> create( + CreateKeysNetworkAclsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, CreateKeysNetworkAclsResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture> get(String id) { + return get(id, null); + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CompletableFuture> get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, NetworkAclKey.class), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/KeysClient.java b/src/main/java/com/auth0/client/mgmt/keys/KeysClient.java index df7f643c8..574af8766 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/KeysClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/KeysClient.java @@ -14,12 +14,15 @@ public class KeysClient { protected final Supplier encryptionClient; + protected final Supplier networkAclsClient; + protected final Supplier signingClient; public KeysClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.customSigningClient = Suppliers.memoize(() -> new CustomSigningClient(clientOptions)); this.encryptionClient = Suppliers.memoize(() -> new EncryptionClient(clientOptions)); + this.networkAclsClient = Suppliers.memoize(() -> new NetworkAclsClient(clientOptions)); this.signingClient = Suppliers.memoize(() -> new SigningClient(clientOptions)); } @@ -31,6 +34,10 @@ public EncryptionClient encryption() { return this.encryptionClient.get(); } + public NetworkAclsClient networkAcls() { + return this.networkAclsClient.get(); + } + public SigningClient signing() { return this.signingClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java new file mode 100644 index 000000000..ec45e4934 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java @@ -0,0 +1,72 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.keys; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.keys.types.CreateKeysNetworkAclsRequestContent; +import com.auth0.client.mgmt.types.CreateKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.GetAllKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.NetworkAclKey; + +public class NetworkAclsClient { + protected final ClientOptions clientOptions; + + private final RawNetworkAclsClient rawClient; + + public NetworkAclsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawNetworkAclsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawNetworkAclsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public GetAllKeysNetworkAclsResponseContent list() { + return this.rawClient.list().body(); + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public GetAllKeysNetworkAclsResponseContent list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).body(); + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CreateKeysNetworkAclsResponseContent create(CreateKeysNetworkAclsRequestContent request) { + return this.rawClient.create(request).body(); + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public CreateKeysNetworkAclsResponseContent create( + CreateKeysNetworkAclsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public NetworkAclKey get(String id) { + return this.rawClient.get(id).body(); + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public NetworkAclKey get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java new file mode 100644 index 000000000..c6d94a6fa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/RawNetworkAclsClient.java @@ -0,0 +1,283 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.keys; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.keys.types.CreateKeysNetworkAclsRequestContent; +import com.auth0.client.mgmt.types.CreateKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.GetAllKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.NetworkAclKey; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawNetworkAclsClient { + protected final ClientOptions clientOptions; + + public RawNetworkAclsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public ManagementApiHttpResponse list() { + return list(null); + } + + /** + * Retrieve all keys used to verify HTTP Message Signatures on Network ACL rules, ordered by creation time descending. + */ + public ManagementApiHttpResponse list(RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, GetAllKeysNetworkAclsResponseContent.class), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public ManagementApiHttpResponse create( + CreateKeysNetworkAclsRequestContent request) { + return create(request, null); + } + + /** + * Create a new key used to verify HTTP Message Signatures on Network ACL rules. + */ + public ManagementApiHttpResponse create( + CreateKeysNetworkAclsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, CreateKeysNetworkAclsResponseContent.class), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public ManagementApiHttpResponse get(String id) { + return get(id, null); + } + + /** + * Retrieve a specific key used to verify HTTP Message Signatures on Network ACL rules. + */ + public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, NetworkAclKey.class), response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/types/CreateKeysNetworkAclsRequestContent.java b/src/main/java/com/auth0/client/mgmt/keys/types/CreateKeysNetworkAclsRequestContent.java new file mode 100644 index 000000000..9e1fcb5ed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/types/CreateKeysNetworkAclsRequestContent.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.keys.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.NetworkAclKeyAlgorithmEnum; +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 = CreateKeysNetworkAclsRequestContent.Builder.class) +public final class CreateKeysNetworkAclsRequestContent { + private final String name; + + private final NetworkAclKeyAlgorithmEnum alg; + + private final String value; + + private final Map additionalProperties; + + private CreateKeysNetworkAclsRequestContent( + String name, NetworkAclKeyAlgorithmEnum alg, String value, Map additionalProperties) { + this.name = name; + this.alg = alg; + this.value = value; + this.additionalProperties = additionalProperties; + } + + /** + * @return Customer-supplied label with no cryptographic meaning. Must be unique across all Network ACL keys for the tenant. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("alg") + public NetworkAclKeyAlgorithmEnum getAlg() { + return alg; + } + + /** + * @return Base64-encoded raw key material. Constraints on the decoded value depend on the algorithm specified. Currently only HMAC-SHA256 is supported. + */ + @JsonProperty("value") + public String getValue() { + return value; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateKeysNetworkAclsRequestContent + && equalTo((CreateKeysNetworkAclsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateKeysNetworkAclsRequestContent other) { + return name.equals(other.name) && alg.equals(other.alg) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.alg, this.value); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

Customer-supplied label with no cryptographic meaning. Must be unique across all Network ACL keys for the tenant.

+ */ + AlgStage name(@NotNull String name); + + Builder from(CreateKeysNetworkAclsRequestContent other); + } + + public interface AlgStage { + ValueStage alg(@NotNull NetworkAclKeyAlgorithmEnum alg); + } + + public interface ValueStage { + /** + *

Base64-encoded raw key material. Constraints on the decoded value depend on the algorithm specified. Currently only HMAC-SHA256 is supported.

+ */ + _FinalStage value(@NotNull String value); + } + + public interface _FinalStage { + CreateKeysNetworkAclsRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, AlgStage, ValueStage, _FinalStage { + private String name; + + private NetworkAclKeyAlgorithmEnum alg; + + private String value; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateKeysNetworkAclsRequestContent other) { + name(other.getName()); + alg(other.getAlg()); + value(other.getValue()); + return this; + } + + /** + *

Customer-supplied label with no cryptographic meaning. Must be unique across all Network ACL keys for the tenant.

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

Base64-encoded raw key material. Constraints on the decoded value depend on the algorithm specified. Currently only HMAC-SHA256 is supported.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("value") + public _FinalStage value(@NotNull String value) { + this.value = Objects.requireNonNull(value, "value must not be null"); + return this; + } + + @java.lang.Override + public CreateKeysNetworkAclsRequestContent build() { + return new CreateKeysNetworkAclsRequestContent(name, alg, value, 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/ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum.java new file mode 100644 index 000000000..126b585e7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum.java @@ -0,0 +1,89 @@ +/** + * 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 ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum { + public static final ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum ALLOW = + new ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum(Value.ALLOW, "allow"); + + public static final ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum BLOCK = + new ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum(Value.BLOCK, "block"); + + private final Value value; + + private final String string; + + ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum(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 ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum + && this.string.equals( + ((ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ALLOW: + return visitor.visitAllow(); + case BLOCK: + return visitor.visitBlock(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum valueOf(String value) { + switch (value) { + case "allow": + return ALLOW; + case "block": + return BLOCK; + default: + return new ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ALLOW, + + BLOCK, + + UNKNOWN + } + + public interface Visitor { + T visitAllow(); + + T visitBlock(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum.java new file mode 100644 index 000000000..b005240be --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum.java @@ -0,0 +1,78 @@ +/** + * 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 ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum { + public static final ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum BLOCK = + new ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum(Value.BLOCK, "block"); + + private final Value value; + + private final String string; + + ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum(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 ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum + && this.string.equals( + ((ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BLOCK: + return visitor.visitBlock(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum valueOf(String value) { + switch (value) { + case "block": + return BLOCK; + default: + return new ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BLOCK, + + UNKNOWN + } + + public interface Visitor { + T visitBlock(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java index e55af4a14..d36fb0932 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java @@ -29,6 +29,8 @@ public final class ClientMyOrganizationPatchConfiguration { private final List allowedStrategies; + private final Optional thirdPartyClientAccess; + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; private final Optional invitationLandingClientId; @@ -39,12 +41,14 @@ private ClientMyOrganizationPatchConfiguration( Optional connectionProfileId, Optional userAttributeProfileId, List allowedStrategies, + Optional thirdPartyClientAccess, ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, Optional invitationLandingClientId, Map additionalProperties) { this.connectionProfileId = connectionProfileId; this.userAttributeProfileId = userAttributeProfileId; this.allowedStrategies = allowedStrategies; + this.thirdPartyClientAccess = thirdPartyClientAccess; this.connectionDeletionBehavior = connectionDeletionBehavior; this.invitationLandingClientId = invitationLandingClientId; this.additionalProperties = additionalProperties; @@ -74,6 +78,11 @@ public List getAllowedSt return allowedStrategies; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + @JsonProperty("connection_deletion_behavior") public ClientMyOrganizationDeletionBehaviorEnum getConnectionDeletionBehavior() { return connectionDeletionBehavior; @@ -103,6 +112,7 @@ private boolean equalTo(ClientMyOrganizationPatchConfiguration other) { return connectionProfileId.equals(other.connectionProfileId) && userAttributeProfileId.equals(other.userAttributeProfileId) && allowedStrategies.equals(other.allowedStrategies) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) && connectionDeletionBehavior.equals(other.connectionDeletionBehavior) && invitationLandingClientId.equals(other.invitationLandingClientId); } @@ -113,6 +123,7 @@ public int hashCode() { this.connectionProfileId, this.userAttributeProfileId, this.allowedStrategies, + this.thirdPartyClientAccess, this.connectionDeletionBehavior, this.invitationLandingClientId); } @@ -164,6 +175,12 @@ public interface _FinalStage { _FinalStage addAllAllowedStrategies( List allowedStrategies); + _FinalStage thirdPartyClientAccess( + Optional thirdPartyClientAccess); + + _FinalStage thirdPartyClientAccess( + ClientMyOrganizationThirdPartyClientAccessConfiguration thirdPartyClientAccess); + /** *

The client ID this client uses while creating invitations through My Organization API.

*/ @@ -178,6 +195,9 @@ public static final class Builder implements ConnectionDeletionBehaviorStage, _F private Optional invitationLandingClientId = Optional.empty(); + private Optional thirdPartyClientAccess = + Optional.empty(); + private List allowedStrategies = new ArrayList<>(); private Optional userAttributeProfileId = Optional.empty(); @@ -194,6 +214,7 @@ public Builder from(ClientMyOrganizationPatchConfiguration other) { connectionProfileId(other.getConnectionProfileId()); userAttributeProfileId(other.getUserAttributeProfileId()); allowedStrategies(other.getAllowedStrategies()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); connectionDeletionBehavior(other.getConnectionDeletionBehavior()); invitationLandingClientId(other.getInvitationLandingClientId()); return this; @@ -228,6 +249,21 @@ public _FinalStage invitationLandingClientId(Optional invitationLandingC return this; } + @java.lang.Override + public _FinalStage thirdPartyClientAccess( + ClientMyOrganizationThirdPartyClientAccessConfiguration thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public _FinalStage thirdPartyClientAccess( + Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + /** *

The allowed connection strategies for the My Organization Configuration.

* @return Reference to {@code this} so that method calls can be chained together. @@ -312,6 +348,7 @@ public ClientMyOrganizationPatchConfiguration build() { connectionProfileId, userAttributeProfileId, allowedStrategies, + thirdPartyClientAccess, connectionDeletionBehavior, invitationLandingClientId, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java index 893627afe..6ef6b59c4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java @@ -29,6 +29,8 @@ public final class ClientMyOrganizationPostConfiguration { private final List allowedStrategies; + private final Optional thirdPartyClientAccess; + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; private final Optional invitationLandingClientId; @@ -39,12 +41,14 @@ private ClientMyOrganizationPostConfiguration( Optional connectionProfileId, Optional userAttributeProfileId, List allowedStrategies, + Optional thirdPartyClientAccess, ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, Optional invitationLandingClientId, Map additionalProperties) { this.connectionProfileId = connectionProfileId; this.userAttributeProfileId = userAttributeProfileId; this.allowedStrategies = allowedStrategies; + this.thirdPartyClientAccess = thirdPartyClientAccess; this.connectionDeletionBehavior = connectionDeletionBehavior; this.invitationLandingClientId = invitationLandingClientId; this.additionalProperties = additionalProperties; @@ -74,6 +78,11 @@ public List getAllowedSt return allowedStrategies; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + @JsonProperty("connection_deletion_behavior") public ClientMyOrganizationDeletionBehaviorEnum getConnectionDeletionBehavior() { return connectionDeletionBehavior; @@ -103,6 +112,7 @@ private boolean equalTo(ClientMyOrganizationPostConfiguration other) { return connectionProfileId.equals(other.connectionProfileId) && userAttributeProfileId.equals(other.userAttributeProfileId) && allowedStrategies.equals(other.allowedStrategies) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) && connectionDeletionBehavior.equals(other.connectionDeletionBehavior) && invitationLandingClientId.equals(other.invitationLandingClientId); } @@ -113,6 +123,7 @@ public int hashCode() { this.connectionProfileId, this.userAttributeProfileId, this.allowedStrategies, + this.thirdPartyClientAccess, this.connectionDeletionBehavior, this.invitationLandingClientId); } @@ -164,6 +175,12 @@ public interface _FinalStage { _FinalStage addAllAllowedStrategies( List allowedStrategies); + _FinalStage thirdPartyClientAccess( + Optional thirdPartyClientAccess); + + _FinalStage thirdPartyClientAccess( + ClientMyOrganizationThirdPartyClientAccessConfiguration thirdPartyClientAccess); + /** *

The client ID this client uses while creating invitations through My Organization API.

*/ @@ -178,6 +195,9 @@ public static final class Builder implements ConnectionDeletionBehaviorStage, _F private Optional invitationLandingClientId = Optional.empty(); + private Optional thirdPartyClientAccess = + Optional.empty(); + private List allowedStrategies = new ArrayList<>(); private Optional userAttributeProfileId = Optional.empty(); @@ -194,6 +214,7 @@ public Builder from(ClientMyOrganizationPostConfiguration other) { connectionProfileId(other.getConnectionProfileId()); userAttributeProfileId(other.getUserAttributeProfileId()); allowedStrategies(other.getAllowedStrategies()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); connectionDeletionBehavior(other.getConnectionDeletionBehavior()); invitationLandingClientId(other.getInvitationLandingClientId()); return this; @@ -228,6 +249,21 @@ public _FinalStage invitationLandingClientId(Optional invitationLandingC return this; } + @java.lang.Override + public _FinalStage thirdPartyClientAccess( + ClientMyOrganizationThirdPartyClientAccessConfiguration thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public _FinalStage thirdPartyClientAccess( + Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + /** *

The allowed connection strategies for the My Organization Configuration.

* @return Reference to {@code this} so that method calls can be chained together. @@ -312,6 +348,7 @@ public ClientMyOrganizationPostConfiguration build() { connectionProfileId, userAttributeProfileId, allowedStrategies, + thirdPartyClientAccess, connectionDeletionBehavior, invitationLandingClientId, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java index f7db3abe0..685cb5d92 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java @@ -29,6 +29,8 @@ public final class ClientMyOrganizationResponseConfiguration { private final List allowedStrategies; + private final Optional thirdPartyClientAccess; + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; private final Optional invitationLandingClientId; @@ -39,12 +41,14 @@ private ClientMyOrganizationResponseConfiguration( Optional connectionProfileId, Optional userAttributeProfileId, List allowedStrategies, + Optional thirdPartyClientAccess, ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, Optional invitationLandingClientId, Map additionalProperties) { this.connectionProfileId = connectionProfileId; this.userAttributeProfileId = userAttributeProfileId; this.allowedStrategies = allowedStrategies; + this.thirdPartyClientAccess = thirdPartyClientAccess; this.connectionDeletionBehavior = connectionDeletionBehavior; this.invitationLandingClientId = invitationLandingClientId; this.additionalProperties = additionalProperties; @@ -74,6 +78,11 @@ public List getAllowedSt return allowedStrategies; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + @JsonProperty("connection_deletion_behavior") public ClientMyOrganizationDeletionBehaviorEnum getConnectionDeletionBehavior() { return connectionDeletionBehavior; @@ -103,6 +112,7 @@ private boolean equalTo(ClientMyOrganizationResponseConfiguration other) { return connectionProfileId.equals(other.connectionProfileId) && userAttributeProfileId.equals(other.userAttributeProfileId) && allowedStrategies.equals(other.allowedStrategies) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) && connectionDeletionBehavior.equals(other.connectionDeletionBehavior) && invitationLandingClientId.equals(other.invitationLandingClientId); } @@ -113,6 +123,7 @@ public int hashCode() { this.connectionProfileId, this.userAttributeProfileId, this.allowedStrategies, + this.thirdPartyClientAccess, this.connectionDeletionBehavior, this.invitationLandingClientId); } @@ -164,6 +175,12 @@ public interface _FinalStage { _FinalStage addAllAllowedStrategies( List allowedStrategies); + _FinalStage thirdPartyClientAccess( + Optional thirdPartyClientAccess); + + _FinalStage thirdPartyClientAccess( + ClientMyOrganizationThirdPartyClientAccessConfiguration thirdPartyClientAccess); + /** *

The client ID this client uses while creating invitations through My Organization API.

*/ @@ -178,6 +195,9 @@ public static final class Builder implements ConnectionDeletionBehaviorStage, _F private Optional invitationLandingClientId = Optional.empty(); + private Optional thirdPartyClientAccess = + Optional.empty(); + private List allowedStrategies = new ArrayList<>(); private Optional userAttributeProfileId = Optional.empty(); @@ -194,6 +214,7 @@ public Builder from(ClientMyOrganizationResponseConfiguration other) { connectionProfileId(other.getConnectionProfileId()); userAttributeProfileId(other.getUserAttributeProfileId()); allowedStrategies(other.getAllowedStrategies()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); connectionDeletionBehavior(other.getConnectionDeletionBehavior()); invitationLandingClientId(other.getInvitationLandingClientId()); return this; @@ -228,6 +249,21 @@ public _FinalStage invitationLandingClientId(Optional invitationLandingC return this; } + @java.lang.Override + public _FinalStage thirdPartyClientAccess( + ClientMyOrganizationThirdPartyClientAccessConfiguration thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public _FinalStage thirdPartyClientAccess( + Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + /** *

The allowed connection strategies for the My Organization Configuration.

* @return Reference to {@code this} so that method calls can be chained together. @@ -312,6 +348,7 @@ public ClientMyOrganizationResponseConfiguration build() { connectionProfileId, userAttributeProfileId, allowedStrategies, + thirdPartyClientAccess, connectionDeletionBehavior, invitationLandingClientId, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationThirdPartyClientAccessConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationThirdPartyClientAccessConfiguration.java new file mode 100644 index 000000000..b26011d3f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationThirdPartyClientAccessConfiguration.java @@ -0,0 +1,193 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientMyOrganizationThirdPartyClientAccessConfiguration.Builder.class) +public final class ClientMyOrganizationThirdPartyClientAccessConfiguration { + private final ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum defaultValue; + + private final List allowedValues; + + private final Map additionalProperties; + + private ClientMyOrganizationThirdPartyClientAccessConfiguration( + ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum defaultValue, + List allowedValues, + Map additionalProperties) { + this.defaultValue = defaultValue; + this.allowedValues = allowedValues; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum getDefaultValue() { + return defaultValue; + } + + /** + * @return The allowed third-party client access values for the My Organization Configuration. + */ + @JsonProperty("allowed_values") + public List getAllowedValues() { + return allowedValues; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientMyOrganizationThirdPartyClientAccessConfiguration + && equalTo((ClientMyOrganizationThirdPartyClientAccessConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientMyOrganizationThirdPartyClientAccessConfiguration other) { + return defaultValue.equals(other.defaultValue) && allowedValues.equals(other.allowedValues); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue, this.allowedValues); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DefaultValueStage builder() { + return new Builder(); + } + + public interface DefaultValueStage { + _FinalStage defaultValue( + @NotNull ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum defaultValue); + + Builder from(ClientMyOrganizationThirdPartyClientAccessConfiguration other); + } + + public interface _FinalStage { + ClientMyOrganizationThirdPartyClientAccessConfiguration build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The allowed third-party client access values for the My Organization Configuration.

+ */ + _FinalStage allowedValues( + List allowedValues); + + _FinalStage addAllowedValues( + ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum allowedValues); + + _FinalStage addAllAllowedValues( + List allowedValues); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements DefaultValueStage, _FinalStage { + private ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum defaultValue; + + private List allowedValues = + new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientMyOrganizationThirdPartyClientAccessConfiguration other) { + defaultValue(other.getDefaultValue()); + allowedValues(other.getAllowedValues()); + return this; + } + + @java.lang.Override + @JsonSetter("default_value") + public _FinalStage defaultValue( + @NotNull ClientMyOrganizationConfigurationThirdPartyClientAccessDefaultValueEnum defaultValue) { + this.defaultValue = Objects.requireNonNull(defaultValue, "defaultValue must not be null"); + return this; + } + + /** + *

The allowed third-party client access values for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllAllowedValues( + List allowedValues) { + if (allowedValues != null) { + this.allowedValues.addAll(allowedValues); + } + return this; + } + + /** + *

The allowed third-party client access values for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllowedValues( + ClientMyOrganizationConfigurationThirdPartyClientAccessAllowedValuesEnum allowedValues) { + this.allowedValues.add(allowedValues); + return this; + } + + /** + *

The allowed third-party client access values for the My Organization Configuration.

+ */ + @java.lang.Override + @JsonSetter(value = "allowed_values", nulls = Nulls.SKIP) + public _FinalStage allowedValues( + List allowedValues) { + this.allowedValues.clear(); + if (allowedValues != null) { + this.allowedValues.addAll(allowedValues); + } + return this; + } + + @java.lang.Override + public ClientMyOrganizationThirdPartyClientAccessConfiguration build() { + return new ClientMyOrganizationThirdPartyClientAccessConfiguration( + defaultValue, allowedValues, 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/ConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java index 80ab6a58b..908131fbb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java @@ -70,6 +70,8 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm private final Optional userinfoEndpoint; + private final Optional useOauthSpecScope; + private final Map additionalProperties; private ConnectionOptionsCommonOidc( @@ -95,6 +97,7 @@ private ConnectionOptionsCommonOidc( Optional tokenEndpointJwtcaAudFormat, OptionalNullable>> upstreamParams, Optional userinfoEndpoint, + Optional useOauthSpecScope, Map additionalProperties) { this.authorizationEndpoint = authorizationEndpoint; this.clientId = clientId; @@ -118,6 +121,7 @@ private ConnectionOptionsCommonOidc( this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.upstreamParams = upstreamParams; this.userinfoEndpoint = userinfoEndpoint; + this.useOauthSpecScope = useOauthSpecScope; this.additionalProperties = additionalProperties; } @@ -269,6 +273,12 @@ public Optional getUserinfoEndpoint() { return userinfoEndpoint; } + @JsonProperty("useOauthSpecScope") + @java.lang.Override + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("id_token_signed_response_algs") private OptionalNullable> _getIdTokenSignedResponseAlgs() { @@ -327,7 +337,8 @@ private boolean equalTo(ConnectionOptionsCommonOidc other) { && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) && upstreamParams.equals(other.upstreamParams) - && userinfoEndpoint.equals(other.userinfoEndpoint); + && userinfoEndpoint.equals(other.userinfoEndpoint) + && useOauthSpecScope.equals(other.useOauthSpecScope); } @java.lang.Override @@ -354,7 +365,8 @@ public int hashCode() { this.tokenEndpointAuthSigningAlg, this.tokenEndpointJwtcaAudFormat, this.upstreamParams, - this.userinfoEndpoint); + this.userinfoEndpoint, + this.useOauthSpecScope); } @java.lang.Override @@ -498,12 +510,18 @@ _FinalStage upstreamParams( _FinalStage userinfoEndpoint(Optional userinfoEndpoint); _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ClientIdStage, _FinalStage { private String clientId; + private Optional useOauthSpecScope = Optional.empty(); + private Optional userinfoEndpoint = Optional.empty(); private OptionalNullable>> upstreamParams = @@ -579,6 +597,7 @@ public Builder from(ConnectionOptionsCommonOidc other) { tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); upstreamParams(other.getUpstreamParams()); userinfoEndpoint(other.getUserinfoEndpoint()); + useOauthSpecScope(other.getUseOauthSpecScope()); return this; } @@ -589,6 +608,19 @@ public _FinalStage clientId(@NotNull String clientId) { return this; } + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + @java.lang.Override public _FinalStage userinfoEndpoint(String userinfoEndpoint) { this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); @@ -998,6 +1030,7 @@ public ConnectionOptionsCommonOidc build() { tokenEndpointJwtcaAudFormat, upstreamParams, userinfoEndpoint, + useOauthSpecScope, additionalProperties); } 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 bd1a13fff..ab6311bbb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java @@ -70,6 +70,8 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc private final Optional userinfoEndpoint; + private final Optional useOauthSpecScope; + private final Optional> nonPersistentAttrs; private final Optional attributeMap; @@ -103,6 +105,7 @@ private ConnectionOptionsOidc( Optional tokenEndpointJwtcaAudFormat, OptionalNullable>> upstreamParams, Optional userinfoEndpoint, + Optional useOauthSpecScope, Optional> nonPersistentAttrs, Optional attributeMap, Optional discoveryUrl, @@ -130,6 +133,7 @@ private ConnectionOptionsOidc( this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.upstreamParams = upstreamParams; this.userinfoEndpoint = userinfoEndpoint; + this.useOauthSpecScope = useOauthSpecScope; this.nonPersistentAttrs = nonPersistentAttrs; this.attributeMap = attributeMap; this.discoveryUrl = discoveryUrl; @@ -285,6 +289,12 @@ public Optional getUserinfoEndpoint() { return userinfoEndpoint; } + @JsonProperty("useOauthSpecScope") + @java.lang.Override + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + @JsonProperty("non_persistent_attrs") @java.lang.Override public Optional> getNonPersistentAttrs() { @@ -365,6 +375,7 @@ private boolean equalTo(ConnectionOptionsOidc other) { && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) && upstreamParams.equals(other.upstreamParams) && userinfoEndpoint.equals(other.userinfoEndpoint) + && useOauthSpecScope.equals(other.useOauthSpecScope) && nonPersistentAttrs.equals(other.nonPersistentAttrs) && attributeMap.equals(other.attributeMap) && discoveryUrl.equals(other.discoveryUrl) @@ -396,6 +407,7 @@ public int hashCode() { this.tokenEndpointJwtcaAudFormat, this.upstreamParams, this.userinfoEndpoint, + this.useOauthSpecScope, this.nonPersistentAttrs, this.attributeMap, this.discoveryUrl, @@ -544,6 +556,10 @@ _FinalStage upstreamParams( _FinalStage userinfoEndpoint(String userinfoEndpoint); + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); _FinalStage nonPersistentAttrs(List nonPersistentAttrs); @@ -573,6 +589,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional> nonPersistentAttrs = Optional.empty(); + private Optional useOauthSpecScope = Optional.empty(); + private Optional userinfoEndpoint = Optional.empty(); private OptionalNullable>> upstreamParams = @@ -648,6 +666,7 @@ public Builder from(ConnectionOptionsOidc other) { tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); upstreamParams(other.getUpstreamParams()); userinfoEndpoint(other.getUserinfoEndpoint()); + useOauthSpecScope(other.getUseOauthSpecScope()); nonPersistentAttrs(other.getNonPersistentAttrs()); attributeMap(other.getAttributeMap()); discoveryUrl(other.getDiscoveryUrl()); @@ -714,6 +733,19 @@ public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) return this; } + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + @java.lang.Override public _FinalStage userinfoEndpoint(String userinfoEndpoint) { this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); @@ -1123,6 +1155,7 @@ public ConnectionOptionsOidc build() { tokenEndpointJwtcaAudFormat, upstreamParams, userinfoEndpoint, + useOauthSpecScope, nonPersistentAttrs, attributeMap, discoveryUrl, 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 06495614e..19a9e2165 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java @@ -72,6 +72,8 @@ public final class ConnectionOptionsOkta implements IConnectionOptionsCommon, IC private final Optional userinfoEndpoint; + private final Optional useOauthSpecScope; + private final Optional attributeMap; private final Optional domain; @@ -104,6 +106,7 @@ private ConnectionOptionsOkta( Optional tokenEndpointJwtcaAudFormat, OptionalNullable>> upstreamParams, Optional userinfoEndpoint, + Optional useOauthSpecScope, Optional attributeMap, Optional domain, Optional type, @@ -131,6 +134,7 @@ private ConnectionOptionsOkta( this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.upstreamParams = upstreamParams; this.userinfoEndpoint = userinfoEndpoint; + this.useOauthSpecScope = useOauthSpecScope; this.attributeMap = attributeMap; this.domain = domain; this.type = type; @@ -291,6 +295,12 @@ public Optional getUserinfoEndpoint() { return userinfoEndpoint; } + @JsonProperty("useOauthSpecScope") + @java.lang.Override + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + @JsonProperty("attribute_map") public Optional getAttributeMap() { return attributeMap; @@ -366,6 +376,7 @@ private boolean equalTo(ConnectionOptionsOkta other) { && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) && upstreamParams.equals(other.upstreamParams) && userinfoEndpoint.equals(other.userinfoEndpoint) + && useOauthSpecScope.equals(other.useOauthSpecScope) && attributeMap.equals(other.attributeMap) && domain.equals(other.domain) && type.equals(other.type); @@ -397,6 +408,7 @@ public int hashCode() { this.tokenEndpointJwtcaAudFormat, this.upstreamParams, this.userinfoEndpoint, + this.useOauthSpecScope, this.attributeMap, this.domain, this.type); @@ -548,6 +560,10 @@ _FinalStage upstreamParams( _FinalStage userinfoEndpoint(String userinfoEndpoint); + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + _FinalStage attributeMap(Optional attributeMap); _FinalStage attributeMap(ConnectionAttributeMapOkta attributeMap); @@ -571,6 +587,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional attributeMap = Optional.empty(); + private Optional useOauthSpecScope = Optional.empty(); + private Optional userinfoEndpoint = Optional.empty(); private OptionalNullable>> upstreamParams = @@ -649,6 +667,7 @@ public Builder from(ConnectionOptionsOkta other) { tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); upstreamParams(other.getUpstreamParams()); userinfoEndpoint(other.getUserinfoEndpoint()); + useOauthSpecScope(other.getUseOauthSpecScope()); attributeMap(other.getAttributeMap()); domain(other.getDomain()); type(other.getType()); @@ -701,6 +720,19 @@ public _FinalStage attributeMap(Optional attributeMa return this; } + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + @java.lang.Override public _FinalStage userinfoEndpoint(String userinfoEndpoint) { this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); @@ -1124,6 +1156,7 @@ public ConnectionOptionsOkta build() { tokenEndpointJwtcaAudFormat, upstreamParams, userinfoEndpoint, + useOauthSpecScope, attributeMap, domain, type, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfile.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfile.java index 21291daf8..d7cbc457e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfile.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfile.java @@ -35,6 +35,8 @@ public final class ConnectionProfile { private final Optional strategyOverrides; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private ConnectionProfile( @@ -45,6 +47,7 @@ private ConnectionProfile( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +56,7 @@ private ConnectionProfile( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +95,11 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -109,7 +118,8 @@ private boolean equalTo(ConnectionProfile other) { && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) && enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); + && strategyOverrides.equals(other.strategyOverrides) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -121,7 +131,8 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -149,6 +160,8 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -162,6 +175,7 @@ public Builder from(ConnectionProfile other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -242,6 +256,18 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(ConnectionProfileCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public ConnectionProfile build() { return new ConnectionProfile( id, @@ -251,6 +277,7 @@ public ConnectionProfile build() { enabledFeatures, connectionConfig, strategyOverrides, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceApp.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceApp.java new file mode 100644 index 000000000..ef8007c5c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceApp.java @@ -0,0 +1,120 @@ +/** + * 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 = ConnectionProfileCrossAppAccessResourceApp.Builder.class) +public final class ConnectionProfileCrossAppAccessResourceApp { + private final ConnectionProfileCrossAppAccessResourceAppStatus status; + + private final Map additionalProperties; + + private ConnectionProfileCrossAppAccessResourceApp( + ConnectionProfileCrossAppAccessResourceAppStatus status, Map additionalProperties) { + this.status = status; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("status") + public ConnectionProfileCrossAppAccessResourceAppStatus getStatus() { + return status; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionProfileCrossAppAccessResourceApp + && equalTo((ConnectionProfileCrossAppAccessResourceApp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionProfileCrossAppAccessResourceApp other) { + return status.equals(other.status); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.status); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static StatusStage builder() { + return new Builder(); + } + + public interface StatusStage { + _FinalStage status(@NotNull ConnectionProfileCrossAppAccessResourceAppStatus status); + + Builder from(ConnectionProfileCrossAppAccessResourceApp other); + } + + public interface _FinalStage { + ConnectionProfileCrossAppAccessResourceApp build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements StatusStage, _FinalStage { + private ConnectionProfileCrossAppAccessResourceAppStatus status; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConnectionProfileCrossAppAccessResourceApp other) { + status(other.getStatus()); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public _FinalStage status(@NotNull ConnectionProfileCrossAppAccessResourceAppStatus status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + public ConnectionProfileCrossAppAccessResourceApp build() { + return new ConnectionProfileCrossAppAccessResourceApp(status, 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/ConnectionProfileCrossAppAccessResourceAppStatus.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatus.java new file mode 100644 index 000000000..2a3f9575b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatus.java @@ -0,0 +1,160 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionProfileCrossAppAccessResourceAppStatus.Builder.class) +public final class ConnectionProfileCrossAppAccessResourceAppStatus { + private final ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum defaultValue; + + private final Optional> allowedValues; + + private final Map additionalProperties; + + private ConnectionProfileCrossAppAccessResourceAppStatus( + ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum defaultValue, + Optional> allowedValues, + Map additionalProperties) { + this.defaultValue = defaultValue; + this.allowedValues = allowedValues; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum getDefaultValue() { + return defaultValue; + } + + @JsonProperty("allowed_values") + public Optional> getAllowedValues() { + return allowedValues; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionProfileCrossAppAccessResourceAppStatus + && equalTo((ConnectionProfileCrossAppAccessResourceAppStatus) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionProfileCrossAppAccessResourceAppStatus other) { + return defaultValue.equals(other.defaultValue) && allowedValues.equals(other.allowedValues); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue, this.allowedValues); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DefaultValueStage builder() { + return new Builder(); + } + + public interface DefaultValueStage { + _FinalStage defaultValue( + @NotNull ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum defaultValue); + + Builder from(ConnectionProfileCrossAppAccessResourceAppStatus other); + } + + public interface _FinalStage { + ConnectionProfileCrossAppAccessResourceAppStatus build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage allowedValues( + Optional> allowedValues); + + _FinalStage allowedValues(List allowedValues); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements DefaultValueStage, _FinalStage { + private ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum defaultValue; + + private Optional> allowedValues = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConnectionProfileCrossAppAccessResourceAppStatus other) { + defaultValue(other.getDefaultValue()); + allowedValues(other.getAllowedValues()); + return this; + } + + @java.lang.Override + @JsonSetter("default_value") + public _FinalStage defaultValue( + @NotNull ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum defaultValue) { + this.defaultValue = Objects.requireNonNull(defaultValue, "defaultValue must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage allowedValues( + List allowedValues) { + this.allowedValues = Optional.ofNullable(allowedValues); + return this; + } + + @java.lang.Override + @JsonSetter(value = "allowed_values", nulls = Nulls.SKIP) + public _FinalStage allowedValues( + Optional> allowedValues) { + this.allowedValues = allowedValues; + return this; + } + + @java.lang.Override + public ConnectionProfileCrossAppAccessResourceAppStatus build() { + return new ConnectionProfileCrossAppAccessResourceAppStatus( + defaultValue, allowedValues, 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/ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum.java new file mode 100644 index 000000000..d2e37e9e0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum.java @@ -0,0 +1,87 @@ +/** + * 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 ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum { + public static final ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum ENABLED = + new ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum(Value.ENABLED, "enabled"); + + public static final ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum DISABLED = + new ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum(Value.DISABLED, "disabled"); + + private final Value value; + + private final String string; + + ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum(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 ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum + && this.string.equals( + ((ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ENABLED: + return visitor.visitEnabled(); + case DISABLED: + return visitor.visitDisabled(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum valueOf(String value) { + switch (value) { + case "enabled": + return ENABLED; + case "disabled": + return DISABLED; + default: + return new ConnectionProfileCrossAppAccessResourceAppStatusDefaultValueEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ENABLED, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitEnabled(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatusValueEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatusValueEnum.java new file mode 100644 index 000000000..fc655296e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileCrossAppAccessResourceAppStatusValueEnum.java @@ -0,0 +1,87 @@ +/** + * 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 ConnectionProfileCrossAppAccessResourceAppStatusValueEnum { + public static final ConnectionProfileCrossAppAccessResourceAppStatusValueEnum ENABLED = + new ConnectionProfileCrossAppAccessResourceAppStatusValueEnum(Value.ENABLED, "enabled"); + + public static final ConnectionProfileCrossAppAccessResourceAppStatusValueEnum DISABLED = + new ConnectionProfileCrossAppAccessResourceAppStatusValueEnum(Value.DISABLED, "disabled"); + + private final Value value; + + private final String string; + + ConnectionProfileCrossAppAccessResourceAppStatusValueEnum(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 ConnectionProfileCrossAppAccessResourceAppStatusValueEnum + && this.string.equals( + ((ConnectionProfileCrossAppAccessResourceAppStatusValueEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ENABLED: + return visitor.visitEnabled(); + case DISABLED: + return visitor.visitDisabled(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ConnectionProfileCrossAppAccessResourceAppStatusValueEnum valueOf(String value) { + switch (value) { + case "enabled": + return ENABLED; + case "disabled": + return DISABLED; + default: + return new ConnectionProfileCrossAppAccessResourceAppStatusValueEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ENABLED, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitEnabled(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} 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 496467447..ce3dea7e1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java @@ -99,6 +99,8 @@ public final class ConnectionPropertiesOptions { private final Optional idTokenSessionExpirySupported; + private final Optional useOauthSpecScope; + private final OptionalNullable discoveryUrl; private final OptionalNullable oidcMetadata; @@ -143,6 +145,7 @@ private ConnectionPropertiesOptions( OptionalNullable tokenEndpointAuthSigningAlg, Optional tokenEndpointJwtcaAudFormat, Optional idTokenSessionExpirySupported, + Optional useOauthSpecScope, OptionalNullable discoveryUrl, OptionalNullable oidcMetadata, Map additionalProperties) { @@ -183,6 +186,7 @@ private ConnectionPropertiesOptions( this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.useOauthSpecScope = useOauthSpecScope; this.discoveryUrl = discoveryUrl; this.oidcMetadata = oidcMetadata; this.additionalProperties = additionalProperties; @@ -451,6 +455,11 @@ public Optional getIdTokenSessionExpirySupported() { return idTokenSessionExpirySupported; } + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("discovery_url") public OptionalNullable getDiscoveryUrl() { @@ -621,6 +630,7 @@ private boolean equalTo(ConnectionPropertiesOptions other) { && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && useOauthSpecScope.equals(other.useOauthSpecScope) && discoveryUrl.equals(other.discoveryUrl) && oidcMetadata.equals(other.oidcMetadata); } @@ -665,6 +675,7 @@ public int hashCode() { this.tokenEndpointAuthSigningAlg, this.tokenEndpointJwtcaAudFormat, this.idTokenSessionExpirySupported, + this.useOauthSpecScope, this.discoveryUrl, this.oidcMetadata); } @@ -760,6 +771,8 @@ public static final class Builder { private Optional idTokenSessionExpirySupported = Optional.empty(); + private Optional useOauthSpecScope = Optional.empty(); + private OptionalNullable discoveryUrl = OptionalNullable.absent(); private OptionalNullable oidcMetadata = OptionalNullable.absent(); @@ -807,6 +820,7 @@ public Builder from(ConnectionPropertiesOptions other) { tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + useOauthSpecScope(other.getUseOauthSpecScope()); discoveryUrl(other.getDiscoveryUrl()); oidcMetadata(other.getOidcMetadata()); return this; @@ -1576,6 +1590,17 @@ public Builder idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupport return this; } + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public Builder useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + public Builder useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) public Builder discoveryUrl(@Nullable OptionalNullable discoveryUrl) { this.discoveryUrl = discoveryUrl; @@ -1677,6 +1702,7 @@ public ConnectionPropertiesOptions build() { tokenEndpointAuthSigningAlg, tokenEndpointJwtcaAudFormat, idTokenSessionExpirySupported, + useOauthSpecScope, discoveryUrl, oidcMetadata, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileRequestContent.java index 28eeefe02..b442c0f6d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileRequestContent.java @@ -34,6 +34,8 @@ public final class CreateConnectionProfileRequestContent { private final Optional strategyOverrides; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private CreateConnectionProfileRequestContent( @@ -43,6 +45,7 @@ private CreateConnectionProfileRequestContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.organization = organization; @@ -50,6 +53,7 @@ private CreateConnectionProfileRequestContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -83,6 +87,11 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -101,7 +110,8 @@ private boolean equalTo(CreateConnectionProfileRequestContent other) { && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) && enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); + && strategyOverrides.equals(other.strategyOverrides) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -112,7 +122,8 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -156,12 +167,19 @@ public interface _FinalStage { _FinalStage strategyOverrides(Optional strategyOverrides); _FinalStage strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides); + + _FinalStage crossAppAccessResourceApp( + Optional crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(ConnectionProfileCrossAppAccessResourceApp crossAppAccessResourceApp); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional crossAppAccessResourceApp = Optional.empty(); + private Optional strategyOverrides = Optional.empty(); private Optional connectionConfig = Optional.empty(); @@ -185,6 +203,7 @@ public Builder from(CreateConnectionProfileRequestContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -195,6 +214,21 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + ConnectionProfileCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + @java.lang.Override public _FinalStage strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { this.strategyOverrides = Optional.ofNullable(strategyOverrides); @@ -269,6 +303,7 @@ public CreateConnectionProfileRequestContent build() { enabledFeatures, connectionConfig, strategyOverrides, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileResponseContent.java index c1eb3e2df..1eb379a76 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileResponseContent.java @@ -35,6 +35,8 @@ public final class CreateConnectionProfileResponseContent { private final Optional strategyOverrides; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private CreateConnectionProfileResponseContent( @@ -45,6 +47,7 @@ private CreateConnectionProfileResponseContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +56,7 @@ private CreateConnectionProfileResponseContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +95,11 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -110,7 +119,8 @@ private boolean equalTo(CreateConnectionProfileResponseContent other) { && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) && enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); + && strategyOverrides.equals(other.strategyOverrides) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -122,7 +132,8 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -150,6 +161,8 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -163,6 +176,7 @@ public Builder from(CreateConnectionProfileResponseContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -243,6 +257,18 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(ConnectionProfileCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public CreateConnectionProfileResponseContent build() { return new CreateConnectionProfileResponseContent( id, @@ -252,6 +278,7 @@ public CreateConnectionProfileResponseContent build() { enabledFeatures, connectionConfig, strategyOverrides, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java index dd3f24f72..881376d42 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; @@ -20,6 +19,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 = CreateCustomDomainRequestContent.Builder.class) @@ -85,6 +85,9 @@ public Optional getTlsPolicy() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("custom_client_ip_header") public OptionalNullable getCustomClientIpHeader() { + if (customClientIpHeader == null) { + return OptionalNullable.absent(); + } return customClientIpHeader; } @@ -101,6 +104,12 @@ 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; @@ -171,13 +180,15 @@ public interface _FinalStage { _FinalStage tlsPolicy(CustomDomainTlsPolicyEnum tlsPolicy); - _FinalStage customClientIpHeader(OptionalNullable customClientIpHeader); + _FinalStage customClientIpHeader( + @Nullable OptionalNullable customClientIpHeader); _FinalStage customClientIpHeader(CustomDomainCustomClientIpHeaderEnum customClientIpHeader); _FinalStage customClientIpHeader(Optional customClientIpHeader); - _FinalStage customClientIpHeader(Nullable customClientIpHeader); + _FinalStage customClientIpHeader( + com.auth0.client.mgmt.core.Nullable customClientIpHeader); _FinalStage domainMetadata(Optional>> domainMetadata); @@ -276,7 +287,8 @@ public _FinalStage domainMetadata(Optional> } @java.lang.Override - public _FinalStage customClientIpHeader(Nullable customClientIpHeader) { + public _FinalStage customClientIpHeader( + com.auth0.client.mgmt.core.Nullable customClientIpHeader) { if (customClientIpHeader.isNull()) { this.customClientIpHeader = OptionalNullable.ofNull(); } else if (customClientIpHeader.isEmpty()) { @@ -306,7 +318,7 @@ public _FinalStage customClientIpHeader(CustomDomainCustomClientIpHeaderEnum cus @java.lang.Override @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) public _FinalStage customClientIpHeader( - OptionalNullable customClientIpHeader) { + @Nullable OptionalNullable customClientIpHeader) { this.customClientIpHeader = customClientIpHeader; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateKeysNetworkAclsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateKeysNetworkAclsResponseContent.java new file mode 100644 index 000000000..9348a3056 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateKeysNetworkAclsResponseContent.java @@ -0,0 +1,293 @@ +/** + * 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 = CreateKeysNetworkAclsResponseContent.Builder.class) +public final class CreateKeysNetworkAclsResponseContent { + private final String id; + + private final String name; + + private final NetworkAclKeyAlgorithmEnum alg; + + private final String fingerprint; + + private final String createdAt; + + private final String updatedAt; + + private final Map additionalProperties; + + private CreateKeysNetworkAclsResponseContent( + String id, + String name, + NetworkAclKeyAlgorithmEnum alg, + String fingerprint, + String createdAt, + String updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.alg = alg; + this.fingerprint = fingerprint; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return Auth0-generated identifier for the key. Used to reference the key from a Network ACL and to identify it in Tenant Logs. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return Customer-supplied label with no cryptographic meaning. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("alg") + public NetworkAclKeyAlgorithmEnum getAlg() { + return alg; + } + + /** + * @return Fingerprint of the key material, determined by the algorithm specified. Currently only HMAC-SHA256 is supported. + */ + @JsonProperty("fingerprint") + public String getFingerprint() { + return fingerprint; + } + + /** + * @return Time when the key was created. + */ + @JsonProperty("created_at") + public String getCreatedAt() { + return createdAt; + } + + /** + * @return Time when the key was last updated. + */ + @JsonProperty("updated_at") + public String getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateKeysNetworkAclsResponseContent + && equalTo((CreateKeysNetworkAclsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateKeysNetworkAclsResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && alg.equals(other.alg) + && fingerprint.equals(other.fingerprint) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.alg, this.fingerprint, this.createdAt, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

Auth0-generated identifier for the key. Used to reference the key from a Network ACL and to identify it in Tenant Logs.

+ */ + NameStage id(@NotNull String id); + + Builder from(CreateKeysNetworkAclsResponseContent other); + } + + public interface NameStage { + /** + *

Customer-supplied label with no cryptographic meaning.

+ */ + AlgStage name(@NotNull String name); + } + + public interface AlgStage { + FingerprintStage alg(@NotNull NetworkAclKeyAlgorithmEnum alg); + } + + public interface FingerprintStage { + /** + *

Fingerprint of the key material, determined by the algorithm specified. Currently only HMAC-SHA256 is supported.

+ */ + CreatedAtStage fingerprint(@NotNull String fingerprint); + } + + public interface CreatedAtStage { + /** + *

Time when the key was created.

+ */ + UpdatedAtStage createdAt(@NotNull String createdAt); + } + + public interface UpdatedAtStage { + /** + *

Time when the key was last updated.

+ */ + _FinalStage updatedAt(@NotNull String updatedAt); + } + + public interface _FinalStage { + CreateKeysNetworkAclsResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, AlgStage, FingerprintStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private NetworkAclKeyAlgorithmEnum alg; + + private String fingerprint; + + private String createdAt; + + private String updatedAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateKeysNetworkAclsResponseContent other) { + id(other.getId()); + name(other.getName()); + alg(other.getAlg()); + fingerprint(other.getFingerprint()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

Auth0-generated identifier for the key. Used to reference the key from a Network ACL and to identify it in Tenant Logs.

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

Customer-supplied label with no cryptographic meaning.

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

Fingerprint of the key material, determined by the algorithm specified. Currently only HMAC-SHA256 is supported.

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

Time when the key was created.

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

Time when the key was last updated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull String updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public CreateKeysNetworkAclsResponseContent build() { + return new CreateKeysNetworkAclsResponseContent( + id, name, alg, fingerprint, createdAt, updatedAt, 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/FlowActionFlowMapValueParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParams.java index 2c82a8298..1c6aa9099 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParams.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParams.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.Objects; import java.util.Optional; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FlowActionFlowMapValueParams.Builder.class) @@ -25,14 +28,14 @@ public final class FlowActionFlowMapValueParams { private final Optional> cases; - private final Optional fallback; + private final OptionalNullable fallback; private final Map additionalProperties; private FlowActionFlowMapValueParams( FlowActionFlowMapValueParamsInput input, Optional> cases, - Optional fallback, + OptionalNullable fallback, Map additionalProperties) { this.input = input; this.cases = cases; @@ -50,8 +53,18 @@ public Optional> getCases() { return cases; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("fallback") - public Optional getFallback() { + public OptionalNullable getFallback() { + if (fallback == null) { + return OptionalNullable.absent(); + } + return fallback; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fallback") + private OptionalNullable _getFallback() { return fallback; } @@ -101,16 +114,20 @@ public interface _FinalStage { _FinalStage cases(Map cases); - _FinalStage fallback(Optional fallback); + _FinalStage fallback(@Nullable OptionalNullable fallback); _FinalStage fallback(FlowActionFlowMapValueParamsFallback fallback); + + _FinalStage fallback(Optional fallback); + + _FinalStage fallback(com.auth0.client.mgmt.core.Nullable fallback); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements InputStage, _FinalStage { private FlowActionFlowMapValueParamsInput input; - private Optional fallback = Optional.empty(); + private OptionalNullable fallback = OptionalNullable.absent(); private Optional> cases = Optional.empty(); @@ -134,15 +151,38 @@ public _FinalStage input(@NotNull FlowActionFlowMapValueParamsInput input) { return this; } + @java.lang.Override + public _FinalStage fallback( + com.auth0.client.mgmt.core.Nullable fallback) { + if (fallback.isNull()) { + this.fallback = OptionalNullable.ofNull(); + } else if (fallback.isEmpty()) { + this.fallback = OptionalNullable.absent(); + } else { + this.fallback = OptionalNullable.of(fallback.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage fallback(Optional fallback) { + if (fallback.isPresent()) { + this.fallback = OptionalNullable.of(fallback.get()); + } else { + this.fallback = OptionalNullable.absent(); + } + return this; + } + @java.lang.Override public _FinalStage fallback(FlowActionFlowMapValueParamsFallback fallback) { - this.fallback = Optional.ofNullable(fallback); + this.fallback = OptionalNullable.of(fallback); return this; } @java.lang.Override @JsonSetter(value = "fallback", nulls = Nulls.SKIP) - public _FinalStage fallback(Optional fallback) { + public _FinalStage fallback(@Nullable OptionalNullable fallback) { this.fallback = fallback; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetAllKeysNetworkAclsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetAllKeysNetworkAclsResponseContent.java new file mode 100644 index 000000000..610807e13 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetAllKeysNetworkAclsResponseContent.java @@ -0,0 +1,123 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetAllKeysNetworkAclsResponseContent.Builder.class) +public final class GetAllKeysNetworkAclsResponseContent { + private final List keys; + + private final Map additionalProperties; + + private GetAllKeysNetworkAclsResponseContent(List keys, Map additionalProperties) { + this.keys = keys; + this.additionalProperties = additionalProperties; + } + + /** + * @return The tenant's Network ACL Keys. + */ + @JsonProperty("keys") + public List getKeys() { + return keys; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetAllKeysNetworkAclsResponseContent + && equalTo((GetAllKeysNetworkAclsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetAllKeysNetworkAclsResponseContent other) { + return keys.equals(other.keys); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.keys); + } + + @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 List keys = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(GetAllKeysNetworkAclsResponseContent other) { + keys(other.getKeys()); + return this; + } + + /** + *

The tenant's Network ACL Keys.

+ */ + @JsonSetter(value = "keys", nulls = Nulls.SKIP) + public Builder keys(List keys) { + this.keys.clear(); + if (keys != null) { + this.keys.addAll(keys); + } + return this; + } + + public Builder addKeys(NetworkAclKey keys) { + this.keys.add(keys); + return this; + } + + public Builder addAllKeys(List keys) { + if (keys != null) { + this.keys.addAll(keys); + } + return this; + } + + public GetAllKeysNetworkAclsResponseContent build() { + return new GetAllKeysNetworkAclsResponseContent(keys, 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/GetConnectionProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetConnectionProfileResponseContent.java index 6faaeb5a4..1ddc51d21 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionProfileResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetConnectionProfileResponseContent.java @@ -35,6 +35,8 @@ public final class GetConnectionProfileResponseContent { private final Optional strategyOverrides; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private GetConnectionProfileResponseContent( @@ -45,6 +47,7 @@ private GetConnectionProfileResponseContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +56,7 @@ private GetConnectionProfileResponseContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +95,11 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -110,7 +119,8 @@ private boolean equalTo(GetConnectionProfileResponseContent other) { && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) && enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); + && strategyOverrides.equals(other.strategyOverrides) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -122,7 +132,8 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -150,6 +161,8 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -163,6 +176,7 @@ public Builder from(GetConnectionProfileResponseContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -243,6 +257,18 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(ConnectionProfileCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public GetConnectionProfileResponseContent build() { return new GetConnectionProfileResponseContent( id, @@ -252,6 +278,7 @@ public GetConnectionProfileResponseContent build() { enabledFeatures, connectionConfig, strategyOverrides, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokenResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokenResponseContent.java index 4656c48fa..880bb9fdd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokenResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokenResponseContent.java @@ -28,11 +28,11 @@ public final class GetRefreshTokenResponseContent { private final Optional userId; - private final Optional createdAt; + private final OptionalNullable createdAt; - private final Optional idleExpiresAt; + private final OptionalNullable idleExpiresAt; - private final Optional expiresAt; + private final OptionalNullable expiresAt; private final Optional device; @@ -46,23 +46,23 @@ public final class GetRefreshTokenResponseContent { private final OptionalNullable> refreshTokenMetadata; - private final Optional lastExchangedAt; + private final OptionalNullable lastExchangedAt; private final Map additionalProperties; private GetRefreshTokenResponseContent( Optional id, Optional userId, - Optional createdAt, - Optional idleExpiresAt, - Optional expiresAt, + OptionalNullable createdAt, + OptionalNullable idleExpiresAt, + OptionalNullable expiresAt, Optional device, Optional clientId, OptionalNullable sessionId, Optional rotating, Optional> resourceServers, OptionalNullable> refreshTokenMetadata, - Optional lastExchangedAt, + OptionalNullable lastExchangedAt, Map additionalProperties) { this.id = id; this.userId = userId; @@ -95,18 +95,30 @@ public Optional getUserId() { return userId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("created_at") - public Optional getCreatedAt() { + public OptionalNullable getCreatedAt() { + if (createdAt == null) { + return OptionalNullable.absent(); + } return createdAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { + public OptionalNullable getIdleExpiresAt() { + if (idleExpiresAt == null) { + return OptionalNullable.absent(); + } return idleExpiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("expires_at") - public Optional getExpiresAt() { + public OptionalNullable getExpiresAt() { + if (expiresAt == null) { + return OptionalNullable.absent(); + } return expiresAt; } @@ -157,11 +169,33 @@ public OptionalNullable> getRefreshTokenMetadata() { return refreshTokenMetadata; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("last_exchanged_at") - public Optional getLastExchangedAt() { + public OptionalNullable getLastExchangedAt() { + if (lastExchangedAt == null) { + return OptionalNullable.absent(); + } return lastExchangedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("created_at") + private OptionalNullable _getCreatedAt() { + return createdAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("idle_expires_at") + private OptionalNullable _getIdleExpiresAt() { + return idleExpiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("expires_at") + private OptionalNullable _getExpiresAt() { + return expiresAt; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_id") private OptionalNullable _getSessionId() { @@ -174,6 +208,12 @@ private OptionalNullable> _getRefreshTokenMetadata() { return refreshTokenMetadata; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("last_exchanged_at") + private OptionalNullable _getLastExchangedAt() { + return lastExchangedAt; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -232,11 +272,11 @@ public static final class Builder { private Optional userId = Optional.empty(); - private Optional createdAt = Optional.empty(); + private OptionalNullable createdAt = OptionalNullable.absent(); - private Optional idleExpiresAt = Optional.empty(); + private OptionalNullable idleExpiresAt = OptionalNullable.absent(); - private Optional expiresAt = Optional.empty(); + private OptionalNullable expiresAt = OptionalNullable.absent(); private Optional device = Optional.empty(); @@ -250,7 +290,7 @@ public static final class Builder { private OptionalNullable> refreshTokenMetadata = OptionalNullable.absent(); - private Optional lastExchangedAt = Optional.empty(); + private OptionalNullable lastExchangedAt = OptionalNullable.absent(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -302,35 +342,95 @@ public Builder userId(String userId) { } @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(@Nullable OptionalNullable createdAt) { this.createdAt = createdAt; return this; } public Builder createdAt(RefreshTokenDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); + this.createdAt = OptionalNullable.of(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + if (createdAt.isPresent()) { + this.createdAt = OptionalNullable.of(createdAt.get()); + } else { + this.createdAt = OptionalNullable.absent(); + } + return this; + } + + public Builder createdAt(com.auth0.client.mgmt.core.Nullable createdAt) { + if (createdAt.isNull()) { + this.createdAt = OptionalNullable.ofNull(); + } else if (createdAt.isEmpty()) { + this.createdAt = OptionalNullable.absent(); + } else { + this.createdAt = OptionalNullable.of(createdAt.get()); + } return this; } @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { + public Builder idleExpiresAt(@Nullable OptionalNullable idleExpiresAt) { this.idleExpiresAt = idleExpiresAt; return this; } public Builder idleExpiresAt(RefreshTokenDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt); + return this; + } + + public Builder idleExpiresAt(Optional idleExpiresAt) { + if (idleExpiresAt.isPresent()) { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } else { + this.idleExpiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder idleExpiresAt(com.auth0.client.mgmt.core.Nullable idleExpiresAt) { + if (idleExpiresAt.isNull()) { + this.idleExpiresAt = OptionalNullable.ofNull(); + } else if (idleExpiresAt.isEmpty()) { + this.idleExpiresAt = OptionalNullable.absent(); + } else { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } return this; } @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { + public Builder expiresAt(@Nullable OptionalNullable expiresAt) { this.expiresAt = expiresAt; return this; } public Builder expiresAt(RefreshTokenDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); + this.expiresAt = OptionalNullable.of(expiresAt); + return this; + } + + public Builder expiresAt(Optional expiresAt) { + if (expiresAt.isPresent()) { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } else { + this.expiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder expiresAt(com.auth0.client.mgmt.core.Nullable expiresAt) { + if (expiresAt.isNull()) { + this.expiresAt = OptionalNullable.ofNull(); + } else if (expiresAt.isEmpty()) { + this.expiresAt = OptionalNullable.absent(); + } else { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } return this; } @@ -451,13 +551,33 @@ public Builder refreshTokenMetadata( } @JsonSetter(value = "last_exchanged_at", nulls = Nulls.SKIP) - public Builder lastExchangedAt(Optional lastExchangedAt) { + public Builder lastExchangedAt(@Nullable OptionalNullable lastExchangedAt) { this.lastExchangedAt = lastExchangedAt; return this; } public Builder lastExchangedAt(RefreshTokenDate lastExchangedAt) { - this.lastExchangedAt = Optional.ofNullable(lastExchangedAt); + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt); + return this; + } + + public Builder lastExchangedAt(Optional lastExchangedAt) { + if (lastExchangedAt.isPresent()) { + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt.get()); + } else { + this.lastExchangedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder lastExchangedAt(com.auth0.client.mgmt.core.Nullable lastExchangedAt) { + if (lastExchangedAt.isNull()) { + this.lastExchangedAt = OptionalNullable.ofNull(); + } else if (lastExchangedAt.isEmpty()) { + this.lastExchangedAt = OptionalNullable.absent(); + } else { + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java index 8acf25afa..13e7c0133 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java @@ -28,17 +28,17 @@ public final class GetSessionResponseContent { private final Optional userId; - private final Optional createdAt; + private final OptionalNullable createdAt; - private final Optional updatedAt; + private final OptionalNullable updatedAt; - private final Optional authenticatedAt; + private final OptionalNullable authenticatedAt; - private final Optional idleExpiresAt; + private final OptionalNullable idleExpiresAt; - private final Optional expiresAt; + private final OptionalNullable expiresAt; - private final Optional lastInteractedAt; + private final OptionalNullable lastInteractedAt; private final Optional device; @@ -57,12 +57,12 @@ public final class GetSessionResponseContent { private GetSessionResponseContent( Optional id, Optional userId, - Optional createdAt, - Optional updatedAt, - Optional authenticatedAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional lastInteractedAt, + OptionalNullable createdAt, + OptionalNullable updatedAt, + OptionalNullable authenticatedAt, + OptionalNullable idleExpiresAt, + OptionalNullable expiresAt, + OptionalNullable lastInteractedAt, Optional device, Optional> clients, Optional authentication, @@ -103,33 +103,57 @@ public Optional getUserId() { return userId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("created_at") - public Optional getCreatedAt() { + public OptionalNullable getCreatedAt() { + if (createdAt == null) { + return OptionalNullable.absent(); + } return createdAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("updated_at") - public Optional getUpdatedAt() { + public OptionalNullable getUpdatedAt() { + if (updatedAt == null) { + return OptionalNullable.absent(); + } return updatedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authenticated_at") - public Optional getAuthenticatedAt() { + public OptionalNullable getAuthenticatedAt() { + if (authenticatedAt == null) { + return OptionalNullable.absent(); + } return authenticatedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { + public OptionalNullable getIdleExpiresAt() { + if (idleExpiresAt == null) { + return OptionalNullable.absent(); + } return idleExpiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("expires_at") - public Optional getExpiresAt() { + public OptionalNullable getExpiresAt() { + if (expiresAt == null) { + return OptionalNullable.absent(); + } return expiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("last_interacted_at") - public Optional getLastInteractedAt() { + public OptionalNullable getLastInteractedAt() { + if (lastInteractedAt == null) { + return OptionalNullable.absent(); + } return lastInteractedAt; } @@ -170,6 +194,42 @@ public Optional getActor() { return actor; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("created_at") + private OptionalNullable _getCreatedAt() { + return createdAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("updated_at") + private OptionalNullable _getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authenticated_at") + private OptionalNullable _getAuthenticatedAt() { + return authenticatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("idle_expires_at") + private OptionalNullable _getIdleExpiresAt() { + return idleExpiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("expires_at") + private OptionalNullable _getExpiresAt() { + return expiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("last_interacted_at") + private OptionalNullable _getLastInteractedAt() { + return lastInteractedAt; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_metadata") private OptionalNullable> _getSessionMetadata() { @@ -238,17 +298,17 @@ public static final class Builder { private Optional userId = Optional.empty(); - private Optional createdAt = Optional.empty(); + private OptionalNullable createdAt = OptionalNullable.absent(); - private Optional updatedAt = Optional.empty(); + private OptionalNullable updatedAt = OptionalNullable.absent(); - private Optional authenticatedAt = Optional.empty(); + private OptionalNullable authenticatedAt = OptionalNullable.absent(); - private Optional idleExpiresAt = Optional.empty(); + private OptionalNullable idleExpiresAt = OptionalNullable.absent(); - private Optional expiresAt = Optional.empty(); + private OptionalNullable expiresAt = OptionalNullable.absent(); - private Optional lastInteractedAt = Optional.empty(); + private OptionalNullable lastInteractedAt = OptionalNullable.absent(); private Optional device = Optional.empty(); @@ -314,68 +374,188 @@ public Builder userId(String userId) { } @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(@Nullable OptionalNullable createdAt) { this.createdAt = createdAt; return this; } public Builder createdAt(SessionDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); + this.createdAt = OptionalNullable.of(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + if (createdAt.isPresent()) { + this.createdAt = OptionalNullable.of(createdAt.get()); + } else { + this.createdAt = OptionalNullable.absent(); + } + return this; + } + + public Builder createdAt(com.auth0.client.mgmt.core.Nullable createdAt) { + if (createdAt.isNull()) { + this.createdAt = OptionalNullable.ofNull(); + } else if (createdAt.isEmpty()) { + this.createdAt = OptionalNullable.absent(); + } else { + this.createdAt = OptionalNullable.of(createdAt.get()); + } return this; } @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(@Nullable OptionalNullable updatedAt) { this.updatedAt = updatedAt; return this; } public Builder updatedAt(SessionDate updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); + this.updatedAt = OptionalNullable.of(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + if (updatedAt.isPresent()) { + this.updatedAt = OptionalNullable.of(updatedAt.get()); + } else { + this.updatedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder updatedAt(com.auth0.client.mgmt.core.Nullable updatedAt) { + if (updatedAt.isNull()) { + this.updatedAt = OptionalNullable.ofNull(); + } else if (updatedAt.isEmpty()) { + this.updatedAt = OptionalNullable.absent(); + } else { + this.updatedAt = OptionalNullable.of(updatedAt.get()); + } return this; } @JsonSetter(value = "authenticated_at", nulls = Nulls.SKIP) - public Builder authenticatedAt(Optional authenticatedAt) { + public Builder authenticatedAt(@Nullable OptionalNullable authenticatedAt) { this.authenticatedAt = authenticatedAt; return this; } public Builder authenticatedAt(SessionDate authenticatedAt) { - this.authenticatedAt = Optional.ofNullable(authenticatedAt); + this.authenticatedAt = OptionalNullable.of(authenticatedAt); + return this; + } + + public Builder authenticatedAt(Optional authenticatedAt) { + if (authenticatedAt.isPresent()) { + this.authenticatedAt = OptionalNullable.of(authenticatedAt.get()); + } else { + this.authenticatedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder authenticatedAt(com.auth0.client.mgmt.core.Nullable authenticatedAt) { + if (authenticatedAt.isNull()) { + this.authenticatedAt = OptionalNullable.ofNull(); + } else if (authenticatedAt.isEmpty()) { + this.authenticatedAt = OptionalNullable.absent(); + } else { + this.authenticatedAt = OptionalNullable.of(authenticatedAt.get()); + } return this; } @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { + public Builder idleExpiresAt(@Nullable OptionalNullable idleExpiresAt) { this.idleExpiresAt = idleExpiresAt; return this; } public Builder idleExpiresAt(SessionDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt); + return this; + } + + public Builder idleExpiresAt(Optional idleExpiresAt) { + if (idleExpiresAt.isPresent()) { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } else { + this.idleExpiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder idleExpiresAt(com.auth0.client.mgmt.core.Nullable idleExpiresAt) { + if (idleExpiresAt.isNull()) { + this.idleExpiresAt = OptionalNullable.ofNull(); + } else if (idleExpiresAt.isEmpty()) { + this.idleExpiresAt = OptionalNullable.absent(); + } else { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } return this; } @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { + public Builder expiresAt(@Nullable OptionalNullable expiresAt) { this.expiresAt = expiresAt; return this; } public Builder expiresAt(SessionDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); + this.expiresAt = OptionalNullable.of(expiresAt); + return this; + } + + public Builder expiresAt(Optional expiresAt) { + if (expiresAt.isPresent()) { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } else { + this.expiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder expiresAt(com.auth0.client.mgmt.core.Nullable expiresAt) { + if (expiresAt.isNull()) { + this.expiresAt = OptionalNullable.ofNull(); + } else if (expiresAt.isEmpty()) { + this.expiresAt = OptionalNullable.absent(); + } else { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } return this; } @JsonSetter(value = "last_interacted_at", nulls = Nulls.SKIP) - public Builder lastInteractedAt(Optional lastInteractedAt) { + public Builder lastInteractedAt(@Nullable OptionalNullable lastInteractedAt) { this.lastInteractedAt = lastInteractedAt; return this; } public Builder lastInteractedAt(SessionDate lastInteractedAt) { - this.lastInteractedAt = Optional.ofNullable(lastInteractedAt); + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt); + return this; + } + + public Builder lastInteractedAt(Optional lastInteractedAt) { + if (lastInteractedAt.isPresent()) { + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt.get()); + } else { + this.lastInteractedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder lastInteractedAt(com.auth0.client.mgmt.core.Nullable lastInteractedAt) { + if (lastInteractedAt.isNull()) { + this.lastInteractedAt = OptionalNullable.ofNull(); + } else if (lastInteractedAt.isEmpty()) { + this.lastInteractedAt = OptionalNullable.absent(); + } else { + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt.get()); + } return this; } 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 804280994..5e3ad5158 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java @@ -52,4 +52,6 @@ public interface IConnectionOptionsCommonOidc { OptionalNullable>> getUpstreamParams(); Optional getUserinfoEndpoint(); + + Optional getUseOauthSpecScope(); } diff --git a/src/main/java/com/auth0/client/mgmt/types/NetworkAclKey.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclKey.java new file mode 100644 index 000000000..6761560d9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NetworkAclKey.java @@ -0,0 +1,291 @@ +/** + * 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 = NetworkAclKey.Builder.class) +public final class NetworkAclKey { + private final String id; + + private final String name; + + private final NetworkAclKeyAlgorithmEnum alg; + + private final String fingerprint; + + private final String createdAt; + + private final String updatedAt; + + private final Map additionalProperties; + + private NetworkAclKey( + String id, + String name, + NetworkAclKeyAlgorithmEnum alg, + String fingerprint, + String createdAt, + String updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.alg = alg; + this.fingerprint = fingerprint; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return Generated identifier for the key. Used to reference the key from a Network ACL and to identify it in Tenant Logs. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return User supplied label for the key. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("alg") + public NetworkAclKeyAlgorithmEnum getAlg() { + return alg; + } + + /** + * @return Fingerprint of the key material, determined by the algorithm specified. Currently only HMAC-SHA256 is supported. + */ + @JsonProperty("fingerprint") + public String getFingerprint() { + return fingerprint; + } + + /** + * @return Time when the key was created. + */ + @JsonProperty("created_at") + public String getCreatedAt() { + return createdAt; + } + + /** + * @return Time when the key was last updated. + */ + @JsonProperty("updated_at") + public String getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NetworkAclKey && equalTo((NetworkAclKey) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NetworkAclKey other) { + return id.equals(other.id) + && name.equals(other.name) + && alg.equals(other.alg) + && fingerprint.equals(other.fingerprint) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.alg, this.fingerprint, this.createdAt, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

Generated identifier for the key. Used to reference the key from a Network ACL and to identify it in Tenant Logs.

+ */ + NameStage id(@NotNull String id); + + Builder from(NetworkAclKey other); + } + + public interface NameStage { + /** + *

User supplied label for the key.

+ */ + AlgStage name(@NotNull String name); + } + + public interface AlgStage { + FingerprintStage alg(@NotNull NetworkAclKeyAlgorithmEnum alg); + } + + public interface FingerprintStage { + /** + *

Fingerprint of the key material, determined by the algorithm specified. Currently only HMAC-SHA256 is supported.

+ */ + CreatedAtStage fingerprint(@NotNull String fingerprint); + } + + public interface CreatedAtStage { + /** + *

Time when the key was created.

+ */ + UpdatedAtStage createdAt(@NotNull String createdAt); + } + + public interface UpdatedAtStage { + /** + *

Time when the key was last updated.

+ */ + _FinalStage updatedAt(@NotNull String updatedAt); + } + + public interface _FinalStage { + NetworkAclKey build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, AlgStage, FingerprintStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private NetworkAclKeyAlgorithmEnum alg; + + private String fingerprint; + + private String createdAt; + + private String updatedAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(NetworkAclKey other) { + id(other.getId()); + name(other.getName()); + alg(other.getAlg()); + fingerprint(other.getFingerprint()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

Generated identifier for the key. Used to reference the key from a Network ACL and to identify it in Tenant Logs.

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

User supplied label for the key.

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

Fingerprint of the key material, determined by the algorithm specified. Currently only HMAC-SHA256 is supported.

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

Time when the key was created.

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

Time when the key was last updated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull String updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public NetworkAclKey build() { + return new NetworkAclKey(id, name, alg, fingerprint, createdAt, updatedAt, 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/NetworkAclKeyAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclKeyAlgorithmEnum.java new file mode 100644 index 000000000..ab9ed9589 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NetworkAclKeyAlgorithmEnum.java @@ -0,0 +1,75 @@ +/** + * 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 NetworkAclKeyAlgorithmEnum { + public static final NetworkAclKeyAlgorithmEnum HMAC_SHA256 = + new NetworkAclKeyAlgorithmEnum(Value.HMAC_SHA256, "hmac-sha256"); + + private final Value value; + + private final String string; + + NetworkAclKeyAlgorithmEnum(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 NetworkAclKeyAlgorithmEnum + && this.string.equals(((NetworkAclKeyAlgorithmEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case HMAC_SHA256: + return visitor.visitHmacSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static NetworkAclKeyAlgorithmEnum valueOf(String value) { + switch (value) { + case "hmac-sha256": + return HMAC_SHA256; + default: + return new NetworkAclKeyAlgorithmEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + HMAC_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitHmacSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/NetworkAclRule.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclRule.java index b32ca5bc6..dd67941d0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclRule.java +++ b/src/main/java/com/auth0/client/mgmt/types/NetworkAclRule.java @@ -27,6 +27,8 @@ public final class NetworkAclRule { private final Optional notMatch; + private final Optional matchAll; + private final NetworkAclRuleScopeEnum scope; private final Map additionalProperties; @@ -35,11 +37,13 @@ private NetworkAclRule( NetworkAclAction action, Optional match, Optional notMatch, + Optional matchAll, NetworkAclRuleScopeEnum scope, Map additionalProperties) { this.action = action; this.match = match; this.notMatch = notMatch; + this.matchAll = matchAll; this.scope = scope; this.additionalProperties = additionalProperties; } @@ -59,6 +63,11 @@ public Optional getNotMatch() { return notMatch; } + @JsonProperty("match_all") + public Optional getMatchAll() { + return matchAll; + } + @JsonProperty("scope") public NetworkAclRuleScopeEnum getScope() { return scope; @@ -79,12 +88,13 @@ private boolean equalTo(NetworkAclRule other) { return action.equals(other.action) && match.equals(other.match) && notMatch.equals(other.notMatch) + && matchAll.equals(other.matchAll) && scope.equals(other.scope); } @java.lang.Override public int hashCode() { - return Objects.hash(this.action, this.match, this.notMatch, this.scope); + return Objects.hash(this.action, this.match, this.notMatch, this.matchAll, this.scope); } @java.lang.Override @@ -120,6 +130,10 @@ public interface _FinalStage { _FinalStage notMatch(Optional notMatch); _FinalStage notMatch(NetworkAclMatch notMatch); + + _FinalStage matchAll(Optional matchAll); + + _FinalStage matchAll(Boolean matchAll); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -128,6 +142,8 @@ public static final class Builder implements ActionStage, ScopeStage, _FinalStag private NetworkAclRuleScopeEnum scope; + private Optional matchAll = Optional.empty(); + private Optional notMatch = Optional.empty(); private Optional match = Optional.empty(); @@ -142,6 +158,7 @@ public Builder from(NetworkAclRule other) { action(other.getAction()); match(other.getMatch()); notMatch(other.getNotMatch()); + matchAll(other.getMatchAll()); scope(other.getScope()); return this; } @@ -160,6 +177,19 @@ public _FinalStage scope(@NotNull NetworkAclRuleScopeEnum scope) { return this; } + @java.lang.Override + public _FinalStage matchAll(Boolean matchAll) { + this.matchAll = Optional.ofNullable(matchAll); + return this; + } + + @java.lang.Override + @JsonSetter(value = "match_all", nulls = Nulls.SKIP) + public _FinalStage matchAll(Optional matchAll) { + this.matchAll = matchAll; + return this; + } + @java.lang.Override public _FinalStage notMatch(NetworkAclMatch notMatch) { this.notMatch = Optional.ofNullable(notMatch); @@ -188,7 +218,7 @@ public _FinalStage match(Optional match) { @java.lang.Override public NetworkAclRule build() { - return new NetworkAclRule(action, match, notMatch, scope, additionalProperties); + return new NetworkAclRule(action, match, notMatch, matchAll, scope, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/OauthScope.java b/src/main/java/com/auth0/client/mgmt/types/OauthScope.java index 3b9dad957..8f3c4bf3f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OauthScope.java +++ b/src/main/java/com/auth0/client/mgmt/types/OauthScope.java @@ -152,6 +152,9 @@ public final class OauthScope { public static final OauthScope DELETE_ORGANIZATION_INVITATIONS = new OauthScope(Value.DELETE_ORGANIZATION_INVITATIONS, "delete:organization_invitations"); + public static final OauthScope READ_NETWORK_ACL_KEYS = + new OauthScope(Value.READ_NETWORK_ACL_KEYS, "read:network_acl_keys"); + public static final OauthScope CREATE_ORGANIZATION_CLIENT_GRANTS = new OauthScope(Value.CREATE_ORGANIZATION_CLIENT_GRANTS, "create:organization_client_grants"); @@ -433,6 +436,9 @@ public final class OauthScope { public static final OauthScope UPDATE_EMAIL_PROVIDER = new OauthScope(Value.UPDATE_EMAIL_PROVIDER, "update:email_provider"); + public static final OauthScope CREATE_NETWORK_ACL_KEYS = + new OauthScope(Value.CREATE_NETWORK_ACL_KEYS, "create:network_acl_keys"); + public static final OauthScope CREATE_ORGANIZATION_CONNECTIONS = new OauthScope(Value.CREATE_ORGANIZATION_CONNECTIONS, "create:organization_connections"); @@ -798,6 +804,8 @@ public T visit(Visitor visitor) { return visitor.visitDeleteClientCredentials(); case DELETE_ORGANIZATION_INVITATIONS: return visitor.visitDeleteOrganizationInvitations(); + case READ_NETWORK_ACL_KEYS: + return visitor.visitReadNetworkAclKeys(); case CREATE_ORGANIZATION_CLIENT_GRANTS: return visitor.visitCreateOrganizationClientGrants(); case READ_USER_IDP_TOKENS: @@ -1012,6 +1020,8 @@ public T visit(Visitor visitor) { return visitor.visitDeleteTokenExchangeProfiles(); case UPDATE_EMAIL_PROVIDER: return visitor.visitUpdateEmailProvider(); + case CREATE_NETWORK_ACL_KEYS: + return visitor.visitCreateNetworkAclKeys(); case CREATE_ORGANIZATION_CONNECTIONS: return visitor.visitCreateOrganizationConnections(); case DELETE_RULES_CONFIGS: @@ -1295,6 +1305,8 @@ public static OauthScope valueOf(String value) { return DELETE_CLIENT_CREDENTIALS; case "delete:organization_invitations": return DELETE_ORGANIZATION_INVITATIONS; + case "read:network_acl_keys": + return READ_NETWORK_ACL_KEYS; case "create:organization_client_grants": return CREATE_ORGANIZATION_CLIENT_GRANTS; case "read:user_idp_tokens": @@ -1509,6 +1521,8 @@ public static OauthScope valueOf(String value) { return DELETE_TOKEN_EXCHANGE_PROFILES; case "update:email_provider": return UPDATE_EMAIL_PROVIDER; + case "create:network_acl_keys": + return CREATE_NETWORK_ACL_KEYS; case "create:organization_connections": return CREATE_ORGANIZATION_CONNECTIONS; case "delete:rules_configs": @@ -2167,6 +2181,10 @@ public enum Value { DELETE_ORGANIZATION_CLIENTS, + CREATE_NETWORK_ACL_KEYS, + + READ_NETWORK_ACL_KEYS, + UNKNOWN } @@ -2659,6 +2677,10 @@ public interface Visitor { T visitDeleteOrganizationClients(); + T visitCreateNetworkAclKeys(); + + T visitReadNetworkAclKeys(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResponseContent.java index 2becee7fd..6ffe1dedc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResponseContent.java @@ -28,11 +28,11 @@ public final class RefreshTokenResponseContent { private final Optional userId; - private final Optional createdAt; + private final OptionalNullable createdAt; - private final Optional idleExpiresAt; + private final OptionalNullable idleExpiresAt; - private final Optional expiresAt; + private final OptionalNullable expiresAt; private final Optional device; @@ -46,23 +46,23 @@ public final class RefreshTokenResponseContent { private final OptionalNullable> refreshTokenMetadata; - private final Optional lastExchangedAt; + private final OptionalNullable lastExchangedAt; private final Map additionalProperties; private RefreshTokenResponseContent( Optional id, Optional userId, - Optional createdAt, - Optional idleExpiresAt, - Optional expiresAt, + OptionalNullable createdAt, + OptionalNullable idleExpiresAt, + OptionalNullable expiresAt, Optional device, Optional clientId, OptionalNullable sessionId, Optional rotating, Optional> resourceServers, OptionalNullable> refreshTokenMetadata, - Optional lastExchangedAt, + OptionalNullable lastExchangedAt, Map additionalProperties) { this.id = id; this.userId = userId; @@ -95,18 +95,30 @@ public Optional getUserId() { return userId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("created_at") - public Optional getCreatedAt() { + public OptionalNullable getCreatedAt() { + if (createdAt == null) { + return OptionalNullable.absent(); + } return createdAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { + public OptionalNullable getIdleExpiresAt() { + if (idleExpiresAt == null) { + return OptionalNullable.absent(); + } return idleExpiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("expires_at") - public Optional getExpiresAt() { + public OptionalNullable getExpiresAt() { + if (expiresAt == null) { + return OptionalNullable.absent(); + } return expiresAt; } @@ -157,11 +169,33 @@ public OptionalNullable> getRefreshTokenMetadata() { return refreshTokenMetadata; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("last_exchanged_at") - public Optional getLastExchangedAt() { + public OptionalNullable getLastExchangedAt() { + if (lastExchangedAt == null) { + return OptionalNullable.absent(); + } return lastExchangedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("created_at") + private OptionalNullable _getCreatedAt() { + return createdAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("idle_expires_at") + private OptionalNullable _getIdleExpiresAt() { + return idleExpiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("expires_at") + private OptionalNullable _getExpiresAt() { + return expiresAt; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_id") private OptionalNullable _getSessionId() { @@ -174,6 +208,12 @@ private OptionalNullable> _getRefreshTokenMetadata() { return refreshTokenMetadata; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("last_exchanged_at") + private OptionalNullable _getLastExchangedAt() { + return lastExchangedAt; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -232,11 +272,11 @@ public static final class Builder { private Optional userId = Optional.empty(); - private Optional createdAt = Optional.empty(); + private OptionalNullable createdAt = OptionalNullable.absent(); - private Optional idleExpiresAt = Optional.empty(); + private OptionalNullable idleExpiresAt = OptionalNullable.absent(); - private Optional expiresAt = Optional.empty(); + private OptionalNullable expiresAt = OptionalNullable.absent(); private Optional device = Optional.empty(); @@ -250,7 +290,7 @@ public static final class Builder { private OptionalNullable> refreshTokenMetadata = OptionalNullable.absent(); - private Optional lastExchangedAt = Optional.empty(); + private OptionalNullable lastExchangedAt = OptionalNullable.absent(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -302,35 +342,95 @@ public Builder userId(String userId) { } @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(@Nullable OptionalNullable createdAt) { this.createdAt = createdAt; return this; } public Builder createdAt(RefreshTokenDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); + this.createdAt = OptionalNullable.of(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + if (createdAt.isPresent()) { + this.createdAt = OptionalNullable.of(createdAt.get()); + } else { + this.createdAt = OptionalNullable.absent(); + } + return this; + } + + public Builder createdAt(com.auth0.client.mgmt.core.Nullable createdAt) { + if (createdAt.isNull()) { + this.createdAt = OptionalNullable.ofNull(); + } else if (createdAt.isEmpty()) { + this.createdAt = OptionalNullable.absent(); + } else { + this.createdAt = OptionalNullable.of(createdAt.get()); + } return this; } @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { + public Builder idleExpiresAt(@Nullable OptionalNullable idleExpiresAt) { this.idleExpiresAt = idleExpiresAt; return this; } public Builder idleExpiresAt(RefreshTokenDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt); + return this; + } + + public Builder idleExpiresAt(Optional idleExpiresAt) { + if (idleExpiresAt.isPresent()) { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } else { + this.idleExpiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder idleExpiresAt(com.auth0.client.mgmt.core.Nullable idleExpiresAt) { + if (idleExpiresAt.isNull()) { + this.idleExpiresAt = OptionalNullable.ofNull(); + } else if (idleExpiresAt.isEmpty()) { + this.idleExpiresAt = OptionalNullable.absent(); + } else { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } return this; } @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { + public Builder expiresAt(@Nullable OptionalNullable expiresAt) { this.expiresAt = expiresAt; return this; } public Builder expiresAt(RefreshTokenDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); + this.expiresAt = OptionalNullable.of(expiresAt); + return this; + } + + public Builder expiresAt(Optional expiresAt) { + if (expiresAt.isPresent()) { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } else { + this.expiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder expiresAt(com.auth0.client.mgmt.core.Nullable expiresAt) { + if (expiresAt.isNull()) { + this.expiresAt = OptionalNullable.ofNull(); + } else if (expiresAt.isEmpty()) { + this.expiresAt = OptionalNullable.absent(); + } else { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } return this; } @@ -451,13 +551,33 @@ public Builder refreshTokenMetadata( } @JsonSetter(value = "last_exchanged_at", nulls = Nulls.SKIP) - public Builder lastExchangedAt(Optional lastExchangedAt) { + public Builder lastExchangedAt(@Nullable OptionalNullable lastExchangedAt) { this.lastExchangedAt = lastExchangedAt; return this; } public Builder lastExchangedAt(RefreshTokenDate lastExchangedAt) { - this.lastExchangedAt = Optional.ofNullable(lastExchangedAt); + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt); + return this; + } + + public Builder lastExchangedAt(Optional lastExchangedAt) { + if (lastExchangedAt.isPresent()) { + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt.get()); + } else { + this.lastExchangedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder lastExchangedAt(com.auth0.client.mgmt.core.Nullable lastExchangedAt) { + if (lastExchangedAt.isNull()) { + this.lastExchangedAt = OptionalNullable.ofNull(); + } else if (lastExchangedAt.isEmpty()) { + this.lastExchangedAt = OptionalNullable.absent(); + } else { + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.java b/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.java index 13fc734e3..f2fe42688 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.java +++ b/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.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; @@ -16,13 +18,14 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SessionAuthenticationSignal.Builder.class) public final class SessionAuthenticationSignal { private final Optional name; - private final Optional timestamp; + private final OptionalNullable timestamp; private final Optional type; @@ -30,7 +33,7 @@ public final class SessionAuthenticationSignal { private SessionAuthenticationSignal( Optional name, - Optional timestamp, + OptionalNullable timestamp, Optional type, Map additionalProperties) { this.name = name; @@ -47,8 +50,12 @@ public Optional getName() { return name; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("timestamp") - public Optional getTimestamp() { + public OptionalNullable getTimestamp() { + if (timestamp == null) { + return OptionalNullable.absent(); + } return timestamp; } @@ -60,6 +67,12 @@ public Optional getType() { return type; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("timestamp") + private OptionalNullable _getTimestamp() { + return timestamp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -93,7 +106,7 @@ public static Builder builder() { public static final class Builder { private Optional name = Optional.empty(); - private Optional timestamp = Optional.empty(); + private OptionalNullable timestamp = OptionalNullable.absent(); private Optional type = Optional.empty(); @@ -124,13 +137,33 @@ public Builder name(String name) { } @JsonSetter(value = "timestamp", nulls = Nulls.SKIP) - public Builder timestamp(Optional timestamp) { + public Builder timestamp(@Nullable OptionalNullable timestamp) { this.timestamp = timestamp; return this; } public Builder timestamp(SessionDate timestamp) { - this.timestamp = Optional.ofNullable(timestamp); + this.timestamp = OptionalNullable.of(timestamp); + return this; + } + + public Builder timestamp(Optional timestamp) { + if (timestamp.isPresent()) { + this.timestamp = OptionalNullable.of(timestamp.get()); + } else { + this.timestamp = OptionalNullable.absent(); + } + return this; + } + + public Builder timestamp(com.auth0.client.mgmt.core.Nullable timestamp) { + if (timestamp.isNull()) { + this.timestamp = OptionalNullable.ofNull(); + } else if (timestamp.isEmpty()) { + this.timestamp = OptionalNullable.absent(); + } else { + this.timestamp = OptionalNullable.of(timestamp.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SessionResponseContent.java index 40fdb414a..e853684e6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SessionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SessionResponseContent.java @@ -28,17 +28,17 @@ public final class SessionResponseContent { private final Optional userId; - private final Optional createdAt; + private final OptionalNullable createdAt; - private final Optional updatedAt; + private final OptionalNullable updatedAt; - private final Optional authenticatedAt; + private final OptionalNullable authenticatedAt; - private final Optional idleExpiresAt; + private final OptionalNullable idleExpiresAt; - private final Optional expiresAt; + private final OptionalNullable expiresAt; - private final Optional lastInteractedAt; + private final OptionalNullable lastInteractedAt; private final Optional device; @@ -57,12 +57,12 @@ public final class SessionResponseContent { private SessionResponseContent( Optional id, Optional userId, - Optional createdAt, - Optional updatedAt, - Optional authenticatedAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional lastInteractedAt, + OptionalNullable createdAt, + OptionalNullable updatedAt, + OptionalNullable authenticatedAt, + OptionalNullable idleExpiresAt, + OptionalNullable expiresAt, + OptionalNullable lastInteractedAt, Optional device, Optional> clients, Optional authentication, @@ -103,33 +103,57 @@ public Optional getUserId() { return userId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("created_at") - public Optional getCreatedAt() { + public OptionalNullable getCreatedAt() { + if (createdAt == null) { + return OptionalNullable.absent(); + } return createdAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("updated_at") - public Optional getUpdatedAt() { + public OptionalNullable getUpdatedAt() { + if (updatedAt == null) { + return OptionalNullable.absent(); + } return updatedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authenticated_at") - public Optional getAuthenticatedAt() { + public OptionalNullable getAuthenticatedAt() { + if (authenticatedAt == null) { + return OptionalNullable.absent(); + } return authenticatedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { + public OptionalNullable getIdleExpiresAt() { + if (idleExpiresAt == null) { + return OptionalNullable.absent(); + } return idleExpiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("expires_at") - public Optional getExpiresAt() { + public OptionalNullable getExpiresAt() { + if (expiresAt == null) { + return OptionalNullable.absent(); + } return expiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("last_interacted_at") - public Optional getLastInteractedAt() { + public OptionalNullable getLastInteractedAt() { + if (lastInteractedAt == null) { + return OptionalNullable.absent(); + } return lastInteractedAt; } @@ -170,6 +194,42 @@ public Optional getActor() { return actor; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("created_at") + private OptionalNullable _getCreatedAt() { + return createdAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("updated_at") + private OptionalNullable _getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authenticated_at") + private OptionalNullable _getAuthenticatedAt() { + return authenticatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("idle_expires_at") + private OptionalNullable _getIdleExpiresAt() { + return idleExpiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("expires_at") + private OptionalNullable _getExpiresAt() { + return expiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("last_interacted_at") + private OptionalNullable _getLastInteractedAt() { + return lastInteractedAt; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_metadata") private OptionalNullable> _getSessionMetadata() { @@ -238,17 +298,17 @@ public static final class Builder { private Optional userId = Optional.empty(); - private Optional createdAt = Optional.empty(); + private OptionalNullable createdAt = OptionalNullable.absent(); - private Optional updatedAt = Optional.empty(); + private OptionalNullable updatedAt = OptionalNullable.absent(); - private Optional authenticatedAt = Optional.empty(); + private OptionalNullable authenticatedAt = OptionalNullable.absent(); - private Optional idleExpiresAt = Optional.empty(); + private OptionalNullable idleExpiresAt = OptionalNullable.absent(); - private Optional expiresAt = Optional.empty(); + private OptionalNullable expiresAt = OptionalNullable.absent(); - private Optional lastInteractedAt = Optional.empty(); + private OptionalNullable lastInteractedAt = OptionalNullable.absent(); private Optional device = Optional.empty(); @@ -314,68 +374,188 @@ public Builder userId(String userId) { } @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(@Nullable OptionalNullable createdAt) { this.createdAt = createdAt; return this; } public Builder createdAt(SessionDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); + this.createdAt = OptionalNullable.of(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + if (createdAt.isPresent()) { + this.createdAt = OptionalNullable.of(createdAt.get()); + } else { + this.createdAt = OptionalNullable.absent(); + } + return this; + } + + public Builder createdAt(com.auth0.client.mgmt.core.Nullable createdAt) { + if (createdAt.isNull()) { + this.createdAt = OptionalNullable.ofNull(); + } else if (createdAt.isEmpty()) { + this.createdAt = OptionalNullable.absent(); + } else { + this.createdAt = OptionalNullable.of(createdAt.get()); + } return this; } @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(@Nullable OptionalNullable updatedAt) { this.updatedAt = updatedAt; return this; } public Builder updatedAt(SessionDate updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); + this.updatedAt = OptionalNullable.of(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + if (updatedAt.isPresent()) { + this.updatedAt = OptionalNullable.of(updatedAt.get()); + } else { + this.updatedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder updatedAt(com.auth0.client.mgmt.core.Nullable updatedAt) { + if (updatedAt.isNull()) { + this.updatedAt = OptionalNullable.ofNull(); + } else if (updatedAt.isEmpty()) { + this.updatedAt = OptionalNullable.absent(); + } else { + this.updatedAt = OptionalNullable.of(updatedAt.get()); + } return this; } @JsonSetter(value = "authenticated_at", nulls = Nulls.SKIP) - public Builder authenticatedAt(Optional authenticatedAt) { + public Builder authenticatedAt(@Nullable OptionalNullable authenticatedAt) { this.authenticatedAt = authenticatedAt; return this; } public Builder authenticatedAt(SessionDate authenticatedAt) { - this.authenticatedAt = Optional.ofNullable(authenticatedAt); + this.authenticatedAt = OptionalNullable.of(authenticatedAt); + return this; + } + + public Builder authenticatedAt(Optional authenticatedAt) { + if (authenticatedAt.isPresent()) { + this.authenticatedAt = OptionalNullable.of(authenticatedAt.get()); + } else { + this.authenticatedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder authenticatedAt(com.auth0.client.mgmt.core.Nullable authenticatedAt) { + if (authenticatedAt.isNull()) { + this.authenticatedAt = OptionalNullable.ofNull(); + } else if (authenticatedAt.isEmpty()) { + this.authenticatedAt = OptionalNullable.absent(); + } else { + this.authenticatedAt = OptionalNullable.of(authenticatedAt.get()); + } return this; } @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { + public Builder idleExpiresAt(@Nullable OptionalNullable idleExpiresAt) { this.idleExpiresAt = idleExpiresAt; return this; } public Builder idleExpiresAt(SessionDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt); + return this; + } + + public Builder idleExpiresAt(Optional idleExpiresAt) { + if (idleExpiresAt.isPresent()) { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } else { + this.idleExpiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder idleExpiresAt(com.auth0.client.mgmt.core.Nullable idleExpiresAt) { + if (idleExpiresAt.isNull()) { + this.idleExpiresAt = OptionalNullable.ofNull(); + } else if (idleExpiresAt.isEmpty()) { + this.idleExpiresAt = OptionalNullable.absent(); + } else { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } return this; } @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { + public Builder expiresAt(@Nullable OptionalNullable expiresAt) { this.expiresAt = expiresAt; return this; } public Builder expiresAt(SessionDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); + this.expiresAt = OptionalNullable.of(expiresAt); + return this; + } + + public Builder expiresAt(Optional expiresAt) { + if (expiresAt.isPresent()) { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } else { + this.expiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder expiresAt(com.auth0.client.mgmt.core.Nullable expiresAt) { + if (expiresAt.isNull()) { + this.expiresAt = OptionalNullable.ofNull(); + } else if (expiresAt.isEmpty()) { + this.expiresAt = OptionalNullable.absent(); + } else { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } return this; } @JsonSetter(value = "last_interacted_at", nulls = Nulls.SKIP) - public Builder lastInteractedAt(Optional lastInteractedAt) { + public Builder lastInteractedAt(@Nullable OptionalNullable lastInteractedAt) { this.lastInteractedAt = lastInteractedAt; return this; } public Builder lastInteractedAt(SessionDate lastInteractedAt) { - this.lastInteractedAt = Optional.ofNullable(lastInteractedAt); + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt); + return this; + } + + public Builder lastInteractedAt(Optional lastInteractedAt) { + if (lastInteractedAt.isPresent()) { + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt.get()); + } else { + this.lastInteractedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder lastInteractedAt(com.auth0.client.mgmt.core.Nullable lastInteractedAt) { + if (lastInteractedAt.isNull()) { + this.lastInteractedAt = OptionalNullable.ofNull(); + } else if (lastInteractedAt.isEmpty()) { + this.lastInteractedAt = OptionalNullable.absent(); + } else { + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt.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 730013814..71e5ce259 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java @@ -99,6 +99,8 @@ public final class UpdateConnectionOptions { private final Optional idTokenSessionExpirySupported; + private final Optional useOauthSpecScope; + private final OptionalNullable discoveryUrl; private final OptionalNullable oidcMetadata; @@ -143,6 +145,7 @@ private UpdateConnectionOptions( OptionalNullable tokenEndpointAuthSigningAlg, Optional tokenEndpointJwtcaAudFormat, Optional idTokenSessionExpirySupported, + Optional useOauthSpecScope, OptionalNullable discoveryUrl, OptionalNullable oidcMetadata, Map additionalProperties) { @@ -183,6 +186,7 @@ private UpdateConnectionOptions( this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.useOauthSpecScope = useOauthSpecScope; this.discoveryUrl = discoveryUrl; this.oidcMetadata = oidcMetadata; this.additionalProperties = additionalProperties; @@ -451,6 +455,11 @@ public Optional getIdTokenSessionExpirySupported() { return idTokenSessionExpirySupported; } + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("discovery_url") public OptionalNullable getDiscoveryUrl() { @@ -621,6 +630,7 @@ private boolean equalTo(UpdateConnectionOptions other) { && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && useOauthSpecScope.equals(other.useOauthSpecScope) && discoveryUrl.equals(other.discoveryUrl) && oidcMetadata.equals(other.oidcMetadata); } @@ -665,6 +675,7 @@ public int hashCode() { this.tokenEndpointAuthSigningAlg, this.tokenEndpointJwtcaAudFormat, this.idTokenSessionExpirySupported, + this.useOauthSpecScope, this.discoveryUrl, this.oidcMetadata); } @@ -760,6 +771,8 @@ public static final class Builder { private Optional idTokenSessionExpirySupported = Optional.empty(); + private Optional useOauthSpecScope = Optional.empty(); + private OptionalNullable discoveryUrl = OptionalNullable.absent(); private OptionalNullable oidcMetadata = OptionalNullable.absent(); @@ -807,6 +820,7 @@ public Builder from(UpdateConnectionOptions other) { tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + useOauthSpecScope(other.getUseOauthSpecScope()); discoveryUrl(other.getDiscoveryUrl()); oidcMetadata(other.getOidcMetadata()); return this; @@ -1576,6 +1590,17 @@ public Builder idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupport return this; } + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public Builder useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + public Builder useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) public Builder discoveryUrl(@Nullable OptionalNullable discoveryUrl) { this.discoveryUrl = discoveryUrl; @@ -1677,6 +1702,7 @@ public UpdateConnectionOptions build() { tokenEndpointAuthSigningAlg, tokenEndpointJwtcaAudFormat, idTokenSessionExpirySupported, + useOauthSpecScope, discoveryUrl, oidcMetadata, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileRequestContent.java index 8fc46e12b..3729c9c96 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileRequestContent.java @@ -33,6 +33,8 @@ public final class UpdateConnectionProfileRequestContent { private final Optional strategyOverrides; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private UpdateConnectionProfileRequestContent( @@ -42,6 +44,7 @@ private UpdateConnectionProfileRequestContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.organization = organization; @@ -49,6 +52,7 @@ private UpdateConnectionProfileRequestContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -82,6 +86,11 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -100,7 +109,8 @@ private boolean equalTo(UpdateConnectionProfileRequestContent other) { && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) && enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); + && strategyOverrides.equals(other.strategyOverrides) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -111,7 +121,8 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -137,6 +148,8 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -149,6 +162,7 @@ public Builder from(UpdateConnectionProfileRequestContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -218,6 +232,18 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(ConnectionProfileCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public UpdateConnectionProfileRequestContent build() { return new UpdateConnectionProfileRequestContent( name, @@ -226,6 +252,7 @@ public UpdateConnectionProfileRequestContent build() { enabledFeatures, connectionConfig, strategyOverrides, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileResponseContent.java index b9ff360fc..01fa3c996 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileResponseContent.java @@ -35,6 +35,8 @@ public final class UpdateConnectionProfileResponseContent { private final Optional strategyOverrides; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private UpdateConnectionProfileResponseContent( @@ -45,6 +47,7 @@ private UpdateConnectionProfileResponseContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +56,7 @@ private UpdateConnectionProfileResponseContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +95,11 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -110,7 +119,8 @@ private boolean equalTo(UpdateConnectionProfileResponseContent other) { && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) && enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); + && strategyOverrides.equals(other.strategyOverrides) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -122,7 +132,8 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -150,6 +161,8 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -163,6 +176,7 @@ public Builder from(UpdateConnectionProfileResponseContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -243,6 +257,18 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(ConnectionProfileCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public UpdateConnectionProfileResponseContent build() { return new UpdateConnectionProfileResponseContent( id, @@ -252,6 +278,7 @@ public UpdateConnectionProfileResponseContent build() { enabledFeatures, connectionConfig, strategyOverrides, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java index 8b67001ea..e570dd5c2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; @@ -19,6 +18,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 = UpdateCustomDomainRequestContent.Builder.class) @@ -57,6 +57,9 @@ public Optional getTlsPolicy() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("custom_client_ip_header") public OptionalNullable getCustomClientIpHeader() { + if (customClientIpHeader == null) { + return OptionalNullable.absent(); + } return customClientIpHeader; } @@ -77,6 +80,12 @@ public OptionalNullable getRelyingPartyIdentifier() { return relyingPartyIdentifier; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("custom_client_ip_header") + private OptionalNullable _getCustomClientIpHeader() { + return customClientIpHeader; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("relying_party_identifier") private OptionalNullable _getRelyingPartyIdentifier() { @@ -155,7 +164,7 @@ public Builder tlsPolicy(CustomDomainTlsPolicyEnum tlsPolicy) { @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) public Builder customClientIpHeader( - OptionalNullable customClientIpHeader) { + @Nullable OptionalNullable customClientIpHeader) { this.customClientIpHeader = customClientIpHeader; return this; } @@ -174,7 +183,8 @@ public Builder customClientIpHeader(Optional customClientIpHeader) { + public Builder customClientIpHeader( + com.auth0.client.mgmt.core.Nullable customClientIpHeader) { if (customClientIpHeader.isNull()) { this.customClientIpHeader = OptionalNullable.ofNull(); } else if (customClientIpHeader.isEmpty()) { @@ -200,8 +210,7 @@ public Builder domainMetadata(Map> domainMetada *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. Set to null to remove the rpId and fall back to using the full domain.

*/ @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public Builder relyingPartyIdentifier( - @org.jetbrains.annotations.Nullable OptionalNullable relyingPartyIdentifier) { + public Builder relyingPartyIdentifier(@Nullable OptionalNullable relyingPartyIdentifier) { this.relyingPartyIdentifier = relyingPartyIdentifier; return this; } @@ -220,7 +229,7 @@ public Builder relyingPartyIdentifier(Optional relyingPartyIdentifier) { return this; } - public Builder relyingPartyIdentifier(Nullable relyingPartyIdentifier) { + public Builder relyingPartyIdentifier(com.auth0.client.mgmt.core.Nullable relyingPartyIdentifier) { if (relyingPartyIdentifier.isNull()) { this.relyingPartyIdentifier = OptionalNullable.ofNull(); } else if (relyingPartyIdentifier.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFormRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFormRequestContent.java index 5c3d4d1c2..712f07648 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFormRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateFormRequestContent.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; @@ -20,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 = UpdateFormRequestContent.Builder.class) @@ -71,42 +71,105 @@ public Optional getName() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("messages") public OptionalNullable getMessages() { + if (messages == null) { + return OptionalNullable.absent(); + } return messages; } @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("languages") public OptionalNullable getLanguages() { + if (languages == null) { + return OptionalNullable.absent(); + } return languages; } @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("translations") public OptionalNullable>> getTranslations() { + if (translations == null) { + return OptionalNullable.absent(); + } return translations; } @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("nodes") public OptionalNullable> getNodes() { + if (nodes == null) { + return OptionalNullable.absent(); + } return nodes; } @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("start") public OptionalNullable getStart() { + if (start == null) { + return OptionalNullable.absent(); + } return start; } @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("ending") public OptionalNullable getEnding() { + if (ending == null) { + return OptionalNullable.absent(); + } return ending; } @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("style") public OptionalNullable getStyle() { + if (style == null) { + return OptionalNullable.absent(); + } + return style; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("messages") + private OptionalNullable _getMessages() { + return messages; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("languages") + private OptionalNullable _getLanguages() { + return languages; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("translations") + private OptionalNullable>> _getTranslations() { + return translations; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("nodes") + private OptionalNullable> _getNodes() { + return nodes; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("start") + private OptionalNullable _getStart() { + return start; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("ending") + private OptionalNullable _getEnding() { + return ending; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("style") + private OptionalNullable _getStyle() { return style; } @@ -201,7 +264,7 @@ public Builder name(String name) { } @JsonSetter(value = "messages", nulls = Nulls.SKIP) - public Builder messages(OptionalNullable messages) { + public Builder messages(@Nullable OptionalNullable messages) { this.messages = messages; return this; } @@ -220,7 +283,7 @@ public Builder messages(Optional messages) { return this; } - public Builder messages(Nullable messages) { + public Builder messages(com.auth0.client.mgmt.core.Nullable messages) { if (messages.isNull()) { this.messages = OptionalNullable.ofNull(); } else if (messages.isEmpty()) { @@ -232,7 +295,7 @@ public Builder messages(Nullable messages) { } @JsonSetter(value = "languages", nulls = Nulls.SKIP) - public Builder languages(OptionalNullable languages) { + public Builder languages(@Nullable OptionalNullable languages) { this.languages = languages; return this; } @@ -251,7 +314,7 @@ public Builder languages(Optional languages) { return this; } - public Builder languages(Nullable languages) { + public Builder languages(com.auth0.client.mgmt.core.Nullable languages) { if (languages.isNull()) { this.languages = OptionalNullable.ofNull(); } else if (languages.isEmpty()) { @@ -263,7 +326,7 @@ public Builder languages(Nullable languages) { } @JsonSetter(value = "translations", nulls = Nulls.SKIP) - public Builder translations(OptionalNullable>> translations) { + public Builder translations(@Nullable OptionalNullable>> translations) { this.translations = translations; return this; } @@ -282,7 +345,8 @@ public Builder translations(Optional>> translati return this; } - public Builder translations(Nullable>> translations) { + public Builder translations( + com.auth0.client.mgmt.core.Nullable>> translations) { if (translations.isNull()) { this.translations = OptionalNullable.ofNull(); } else if (translations.isEmpty()) { @@ -294,7 +358,7 @@ public Builder translations(Nullable>> translati } @JsonSetter(value = "nodes", nulls = Nulls.SKIP) - public Builder nodes(OptionalNullable> nodes) { + public Builder nodes(@Nullable OptionalNullable> nodes) { this.nodes = nodes; return this; } @@ -313,7 +377,7 @@ public Builder nodes(Optional> nodes) { return this; } - public Builder nodes(Nullable> nodes) { + public Builder nodes(com.auth0.client.mgmt.core.Nullable> nodes) { if (nodes.isNull()) { this.nodes = OptionalNullable.ofNull(); } else if (nodes.isEmpty()) { @@ -325,7 +389,7 @@ public Builder nodes(Nullable> nodes) { } @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(OptionalNullable start) { + public Builder start(@Nullable OptionalNullable start) { this.start = start; return this; } @@ -344,7 +408,7 @@ public Builder start(Optional start) { return this; } - public Builder start(Nullable start) { + public Builder start(com.auth0.client.mgmt.core.Nullable start) { if (start.isNull()) { this.start = OptionalNullable.ofNull(); } else if (start.isEmpty()) { @@ -356,7 +420,7 @@ public Builder start(Nullable start) { } @JsonSetter(value = "ending", nulls = Nulls.SKIP) - public Builder ending(OptionalNullable ending) { + public Builder ending(@Nullable OptionalNullable ending) { this.ending = ending; return this; } @@ -375,7 +439,7 @@ public Builder ending(Optional ending) { return this; } - public Builder ending(Nullable ending) { + public Builder ending(com.auth0.client.mgmt.core.Nullable ending) { if (ending.isNull()) { this.ending = OptionalNullable.ofNull(); } else if (ending.isEmpty()) { @@ -387,7 +451,7 @@ public Builder ending(Nullable ending) { } @JsonSetter(value = "style", nulls = Nulls.SKIP) - public Builder style(OptionalNullable style) { + public Builder style(@Nullable OptionalNullable style) { this.style = style; return this; } @@ -406,7 +470,7 @@ public Builder style(Optional style) { return this; } - public Builder style(Nullable style) { + public Builder style(com.auth0.client.mgmt.core.Nullable style) { if (style.isNull()) { this.style = OptionalNullable.ofNull(); } else if (style.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenResponseContent.java index 42b072e6d..34c5f9d29 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenResponseContent.java @@ -28,11 +28,11 @@ public final class UpdateRefreshTokenResponseContent { private final Optional userId; - private final Optional createdAt; + private final OptionalNullable createdAt; - private final Optional idleExpiresAt; + private final OptionalNullable idleExpiresAt; - private final Optional expiresAt; + private final OptionalNullable expiresAt; private final Optional device; @@ -46,23 +46,23 @@ public final class UpdateRefreshTokenResponseContent { private final OptionalNullable> refreshTokenMetadata; - private final Optional lastExchangedAt; + private final OptionalNullable lastExchangedAt; private final Map additionalProperties; private UpdateRefreshTokenResponseContent( Optional id, Optional userId, - Optional createdAt, - Optional idleExpiresAt, - Optional expiresAt, + OptionalNullable createdAt, + OptionalNullable idleExpiresAt, + OptionalNullable expiresAt, Optional device, Optional clientId, OptionalNullable sessionId, Optional rotating, Optional> resourceServers, OptionalNullable> refreshTokenMetadata, - Optional lastExchangedAt, + OptionalNullable lastExchangedAt, Map additionalProperties) { this.id = id; this.userId = userId; @@ -95,18 +95,30 @@ public Optional getUserId() { return userId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("created_at") - public Optional getCreatedAt() { + public OptionalNullable getCreatedAt() { + if (createdAt == null) { + return OptionalNullable.absent(); + } return createdAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { + public OptionalNullable getIdleExpiresAt() { + if (idleExpiresAt == null) { + return OptionalNullable.absent(); + } return idleExpiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("expires_at") - public Optional getExpiresAt() { + public OptionalNullable getExpiresAt() { + if (expiresAt == null) { + return OptionalNullable.absent(); + } return expiresAt; } @@ -157,11 +169,33 @@ public OptionalNullable> getRefreshTokenMetadata() { return refreshTokenMetadata; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("last_exchanged_at") - public Optional getLastExchangedAt() { + public OptionalNullable getLastExchangedAt() { + if (lastExchangedAt == null) { + return OptionalNullable.absent(); + } return lastExchangedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("created_at") + private OptionalNullable _getCreatedAt() { + return createdAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("idle_expires_at") + private OptionalNullable _getIdleExpiresAt() { + return idleExpiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("expires_at") + private OptionalNullable _getExpiresAt() { + return expiresAt; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_id") private OptionalNullable _getSessionId() { @@ -174,6 +208,12 @@ private OptionalNullable> _getRefreshTokenMetadata() { return refreshTokenMetadata; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("last_exchanged_at") + private OptionalNullable _getLastExchangedAt() { + return lastExchangedAt; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -232,11 +272,11 @@ public static final class Builder { private Optional userId = Optional.empty(); - private Optional createdAt = Optional.empty(); + private OptionalNullable createdAt = OptionalNullable.absent(); - private Optional idleExpiresAt = Optional.empty(); + private OptionalNullable idleExpiresAt = OptionalNullable.absent(); - private Optional expiresAt = Optional.empty(); + private OptionalNullable expiresAt = OptionalNullable.absent(); private Optional device = Optional.empty(); @@ -250,7 +290,7 @@ public static final class Builder { private OptionalNullable> refreshTokenMetadata = OptionalNullable.absent(); - private Optional lastExchangedAt = Optional.empty(); + private OptionalNullable lastExchangedAt = OptionalNullable.absent(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -302,35 +342,95 @@ public Builder userId(String userId) { } @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(@Nullable OptionalNullable createdAt) { this.createdAt = createdAt; return this; } public Builder createdAt(RefreshTokenDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); + this.createdAt = OptionalNullable.of(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + if (createdAt.isPresent()) { + this.createdAt = OptionalNullable.of(createdAt.get()); + } else { + this.createdAt = OptionalNullable.absent(); + } + return this; + } + + public Builder createdAt(com.auth0.client.mgmt.core.Nullable createdAt) { + if (createdAt.isNull()) { + this.createdAt = OptionalNullable.ofNull(); + } else if (createdAt.isEmpty()) { + this.createdAt = OptionalNullable.absent(); + } else { + this.createdAt = OptionalNullable.of(createdAt.get()); + } return this; } @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { + public Builder idleExpiresAt(@Nullable OptionalNullable idleExpiresAt) { this.idleExpiresAt = idleExpiresAt; return this; } public Builder idleExpiresAt(RefreshTokenDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt); + return this; + } + + public Builder idleExpiresAt(Optional idleExpiresAt) { + if (idleExpiresAt.isPresent()) { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } else { + this.idleExpiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder idleExpiresAt(com.auth0.client.mgmt.core.Nullable idleExpiresAt) { + if (idleExpiresAt.isNull()) { + this.idleExpiresAt = OptionalNullable.ofNull(); + } else if (idleExpiresAt.isEmpty()) { + this.idleExpiresAt = OptionalNullable.absent(); + } else { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } return this; } @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { + public Builder expiresAt(@Nullable OptionalNullable expiresAt) { this.expiresAt = expiresAt; return this; } public Builder expiresAt(RefreshTokenDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); + this.expiresAt = OptionalNullable.of(expiresAt); + return this; + } + + public Builder expiresAt(Optional expiresAt) { + if (expiresAt.isPresent()) { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } else { + this.expiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder expiresAt(com.auth0.client.mgmt.core.Nullable expiresAt) { + if (expiresAt.isNull()) { + this.expiresAt = OptionalNullable.ofNull(); + } else if (expiresAt.isEmpty()) { + this.expiresAt = OptionalNullable.absent(); + } else { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } return this; } @@ -451,13 +551,33 @@ public Builder refreshTokenMetadata( } @JsonSetter(value = "last_exchanged_at", nulls = Nulls.SKIP) - public Builder lastExchangedAt(Optional lastExchangedAt) { + public Builder lastExchangedAt(@Nullable OptionalNullable lastExchangedAt) { this.lastExchangedAt = lastExchangedAt; return this; } public Builder lastExchangedAt(RefreshTokenDate lastExchangedAt) { - this.lastExchangedAt = Optional.ofNullable(lastExchangedAt); + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt); + return this; + } + + public Builder lastExchangedAt(Optional lastExchangedAt) { + if (lastExchangedAt.isPresent()) { + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt.get()); + } else { + this.lastExchangedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder lastExchangedAt(com.auth0.client.mgmt.core.Nullable lastExchangedAt) { + if (lastExchangedAt.isNull()) { + this.lastExchangedAt = OptionalNullable.ofNull(); + } else if (lastExchangedAt.isEmpty()) { + this.lastExchangedAt = OptionalNullable.absent(); + } else { + this.lastExchangedAt = OptionalNullable.of(lastExchangedAt.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java index 9bc5f1e31..a6b7b9b53 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java @@ -75,6 +75,9 @@ public OptionalNullable getDescription() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("branding") public OptionalNullable getBranding() { + if (branding == null) { + return OptionalNullable.absent(); + } return branding; } @@ -113,6 +116,12 @@ private OptionalNullable _getDescription() { return description; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("branding") + private OptionalNullable _getBranding() { + return branding; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("user_attributes") private OptionalNullable> _getUserAttributes() { @@ -241,7 +250,7 @@ public Builder description(com.auth0.client.mgmt.core.Nullable descripti } @JsonSetter(value = "branding", nulls = Nulls.SKIP) - public Builder branding(OptionalNullable branding) { + public Builder branding(@Nullable OptionalNullable branding) { this.branding = branding; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSessionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSessionResponseContent.java index 1eb45cdaf..266f7b2af 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSessionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateSessionResponseContent.java @@ -28,17 +28,17 @@ public final class UpdateSessionResponseContent { private final Optional userId; - private final Optional createdAt; + private final OptionalNullable createdAt; - private final Optional updatedAt; + private final OptionalNullable updatedAt; - private final Optional authenticatedAt; + private final OptionalNullable authenticatedAt; - private final Optional idleExpiresAt; + private final OptionalNullable idleExpiresAt; - private final Optional expiresAt; + private final OptionalNullable expiresAt; - private final Optional lastInteractedAt; + private final OptionalNullable lastInteractedAt; private final Optional device; @@ -57,12 +57,12 @@ public final class UpdateSessionResponseContent { private UpdateSessionResponseContent( Optional id, Optional userId, - Optional createdAt, - Optional updatedAt, - Optional authenticatedAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional lastInteractedAt, + OptionalNullable createdAt, + OptionalNullable updatedAt, + OptionalNullable authenticatedAt, + OptionalNullable idleExpiresAt, + OptionalNullable expiresAt, + OptionalNullable lastInteractedAt, Optional device, Optional> clients, Optional authentication, @@ -103,33 +103,57 @@ public Optional getUserId() { return userId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("created_at") - public Optional getCreatedAt() { + public OptionalNullable getCreatedAt() { + if (createdAt == null) { + return OptionalNullable.absent(); + } return createdAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("updated_at") - public Optional getUpdatedAt() { + public OptionalNullable getUpdatedAt() { + if (updatedAt == null) { + return OptionalNullable.absent(); + } return updatedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authenticated_at") - public Optional getAuthenticatedAt() { + public OptionalNullable getAuthenticatedAt() { + if (authenticatedAt == null) { + return OptionalNullable.absent(); + } return authenticatedAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { + public OptionalNullable getIdleExpiresAt() { + if (idleExpiresAt == null) { + return OptionalNullable.absent(); + } return idleExpiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("expires_at") - public Optional getExpiresAt() { + public OptionalNullable getExpiresAt() { + if (expiresAt == null) { + return OptionalNullable.absent(); + } return expiresAt; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("last_interacted_at") - public Optional getLastInteractedAt() { + public OptionalNullable getLastInteractedAt() { + if (lastInteractedAt == null) { + return OptionalNullable.absent(); + } return lastInteractedAt; } @@ -170,6 +194,42 @@ public Optional getActor() { return actor; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("created_at") + private OptionalNullable _getCreatedAt() { + return createdAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("updated_at") + private OptionalNullable _getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authenticated_at") + private OptionalNullable _getAuthenticatedAt() { + return authenticatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("idle_expires_at") + private OptionalNullable _getIdleExpiresAt() { + return idleExpiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("expires_at") + private OptionalNullable _getExpiresAt() { + return expiresAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("last_interacted_at") + private OptionalNullable _getLastInteractedAt() { + return lastInteractedAt; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_metadata") private OptionalNullable> _getSessionMetadata() { @@ -238,17 +298,17 @@ public static final class Builder { private Optional userId = Optional.empty(); - private Optional createdAt = Optional.empty(); + private OptionalNullable createdAt = OptionalNullable.absent(); - private Optional updatedAt = Optional.empty(); + private OptionalNullable updatedAt = OptionalNullable.absent(); - private Optional authenticatedAt = Optional.empty(); + private OptionalNullable authenticatedAt = OptionalNullable.absent(); - private Optional idleExpiresAt = Optional.empty(); + private OptionalNullable idleExpiresAt = OptionalNullable.absent(); - private Optional expiresAt = Optional.empty(); + private OptionalNullable expiresAt = OptionalNullable.absent(); - private Optional lastInteractedAt = Optional.empty(); + private OptionalNullable lastInteractedAt = OptionalNullable.absent(); private Optional device = Optional.empty(); @@ -314,68 +374,188 @@ public Builder userId(String userId) { } @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { + public Builder createdAt(@Nullable OptionalNullable createdAt) { this.createdAt = createdAt; return this; } public Builder createdAt(SessionDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); + this.createdAt = OptionalNullable.of(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + if (createdAt.isPresent()) { + this.createdAt = OptionalNullable.of(createdAt.get()); + } else { + this.createdAt = OptionalNullable.absent(); + } + return this; + } + + public Builder createdAt(com.auth0.client.mgmt.core.Nullable createdAt) { + if (createdAt.isNull()) { + this.createdAt = OptionalNullable.ofNull(); + } else if (createdAt.isEmpty()) { + this.createdAt = OptionalNullable.absent(); + } else { + this.createdAt = OptionalNullable.of(createdAt.get()); + } return this; } @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(@Nullable OptionalNullable updatedAt) { this.updatedAt = updatedAt; return this; } public Builder updatedAt(SessionDate updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); + this.updatedAt = OptionalNullable.of(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + if (updatedAt.isPresent()) { + this.updatedAt = OptionalNullable.of(updatedAt.get()); + } else { + this.updatedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder updatedAt(com.auth0.client.mgmt.core.Nullable updatedAt) { + if (updatedAt.isNull()) { + this.updatedAt = OptionalNullable.ofNull(); + } else if (updatedAt.isEmpty()) { + this.updatedAt = OptionalNullable.absent(); + } else { + this.updatedAt = OptionalNullable.of(updatedAt.get()); + } return this; } @JsonSetter(value = "authenticated_at", nulls = Nulls.SKIP) - public Builder authenticatedAt(Optional authenticatedAt) { + public Builder authenticatedAt(@Nullable OptionalNullable authenticatedAt) { this.authenticatedAt = authenticatedAt; return this; } public Builder authenticatedAt(SessionDate authenticatedAt) { - this.authenticatedAt = Optional.ofNullable(authenticatedAt); + this.authenticatedAt = OptionalNullable.of(authenticatedAt); + return this; + } + + public Builder authenticatedAt(Optional authenticatedAt) { + if (authenticatedAt.isPresent()) { + this.authenticatedAt = OptionalNullable.of(authenticatedAt.get()); + } else { + this.authenticatedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder authenticatedAt(com.auth0.client.mgmt.core.Nullable authenticatedAt) { + if (authenticatedAt.isNull()) { + this.authenticatedAt = OptionalNullable.ofNull(); + } else if (authenticatedAt.isEmpty()) { + this.authenticatedAt = OptionalNullable.absent(); + } else { + this.authenticatedAt = OptionalNullable.of(authenticatedAt.get()); + } return this; } @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { + public Builder idleExpiresAt(@Nullable OptionalNullable idleExpiresAt) { this.idleExpiresAt = idleExpiresAt; return this; } public Builder idleExpiresAt(SessionDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt); + return this; + } + + public Builder idleExpiresAt(Optional idleExpiresAt) { + if (idleExpiresAt.isPresent()) { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } else { + this.idleExpiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder idleExpiresAt(com.auth0.client.mgmt.core.Nullable idleExpiresAt) { + if (idleExpiresAt.isNull()) { + this.idleExpiresAt = OptionalNullable.ofNull(); + } else if (idleExpiresAt.isEmpty()) { + this.idleExpiresAt = OptionalNullable.absent(); + } else { + this.idleExpiresAt = OptionalNullable.of(idleExpiresAt.get()); + } return this; } @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { + public Builder expiresAt(@Nullable OptionalNullable expiresAt) { this.expiresAt = expiresAt; return this; } public Builder expiresAt(SessionDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); + this.expiresAt = OptionalNullable.of(expiresAt); + return this; + } + + public Builder expiresAt(Optional expiresAt) { + if (expiresAt.isPresent()) { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } else { + this.expiresAt = OptionalNullable.absent(); + } + return this; + } + + public Builder expiresAt(com.auth0.client.mgmt.core.Nullable expiresAt) { + if (expiresAt.isNull()) { + this.expiresAt = OptionalNullable.ofNull(); + } else if (expiresAt.isEmpty()) { + this.expiresAt = OptionalNullable.absent(); + } else { + this.expiresAt = OptionalNullable.of(expiresAt.get()); + } return this; } @JsonSetter(value = "last_interacted_at", nulls = Nulls.SKIP) - public Builder lastInteractedAt(Optional lastInteractedAt) { + public Builder lastInteractedAt(@Nullable OptionalNullable lastInteractedAt) { this.lastInteractedAt = lastInteractedAt; return this; } public Builder lastInteractedAt(SessionDate lastInteractedAt) { - this.lastInteractedAt = Optional.ofNullable(lastInteractedAt); + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt); + return this; + } + + public Builder lastInteractedAt(Optional lastInteractedAt) { + if (lastInteractedAt.isPresent()) { + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt.get()); + } else { + this.lastInteractedAt = OptionalNullable.absent(); + } + return this; + } + + public Builder lastInteractedAt(com.auth0.client.mgmt.core.Nullable lastInteractedAt) { + if (lastInteractedAt.isNull()) { + this.lastInteractedAt = OptionalNullable.ofNull(); + } else if (lastInteractedAt.isEmpty()) { + this.lastInteractedAt = OptionalNullable.absent(); + } else { + this.lastInteractedAt = OptionalNullable.of(lastInteractedAt.get()); + } return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileRequestContent.java index c25a75cef..0b97a44f9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileRequestContent.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; @@ -19,6 +18,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 = UpdateUserAttributeProfileRequestContent.Builder.class) @@ -50,6 +50,9 @@ public Optional getName() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("user_id") public OptionalNullable getUserId() { + if (userId == null) { + return OptionalNullable.absent(); + } return userId; } @@ -58,6 +61,12 @@ public Optional _getUserId() { + return userId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -121,7 +130,7 @@ public Builder name(String name) { } @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public Builder userId(OptionalNullable userId) { + public Builder userId(@Nullable OptionalNullable userId) { this.userId = userId; return this; } @@ -140,7 +149,7 @@ public Builder userId(Optional userId) { return this; } - public Builder userId(Nullable userId) { + public Builder userId(com.auth0.client.mgmt.core.Nullable userId) { if (userId.isNull()) { this.userId = OptionalNullable.ofNull(); } else if (userId.isEmpty()) { diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java index d62104e30..b042fc6a7 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java @@ -47,7 +47,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"next\":\"next\",\"connection_profiles\":[{\"id\":\"id\",\"name\":\"name\",\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"]}]}")); + "{\"next\":\"next\",\"connection_profiles\":[{\"id\":\"id\",\"name\":\"name\",\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"],\"cross_app_access_resource_app\":{\"status\":{\"default_value\":\"enabled\"}}}]}")); SyncPagingIterable response = client.connectionProfiles() .list(ListConnectionProfileRequestParameters.builder() .from("from") diff --git a/src/test/java/com/auth0/client/mgmt/KeysNetworkAclsWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysNetworkAclsWireTest.java new file mode 100644 index 000000000..19575a85f --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/KeysNetworkAclsWireTest.java @@ -0,0 +1,280 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.keys.types.CreateKeysNetworkAclsRequestContent; +import com.auth0.client.mgmt.types.CreateKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.GetAllKeysNetworkAclsResponseContent; +import com.auth0.client.mgmt.types.NetworkAclKey; +import com.auth0.client.mgmt.types.NetworkAclKeyAlgorithmEnum; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import okhttp3.mockwebserver.RecordedRequest; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class KeysNetworkAclsWireTest { + private MockWebServer server; + private ManagementApi client; + private ObjectMapper objectMapper = ObjectMappers.JSON_MAPPER; + + @BeforeEach + public void setup() throws Exception { + server = new MockWebServer(); + server.start(); + client = ManagementApi.builder() + .url(server.url("/").toString()) + .token("test-token") + .build(); + } + + @AfterEach + public void teardown() throws Exception { + server.shutdown(); + } + + @Test + public void testList() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"keys\":[{\"id\":\"id\",\"name\":\"name\",\"alg\":\"hmac-sha256\",\"fingerprint\":\"fingerprint\",\"created_at\":\"created_at\",\"updated_at\":\"updated_at\"}]}")); + GetAllKeysNetworkAclsResponseContent response = + client.keys().networkAcls().list(); + 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" + + " \"keys\": [\n" + + " {\n" + + " \"id\": \"id\",\n" + + " \"name\": \"name\",\n" + + " \"alg\": \"hmac-sha256\",\n" + + " \"fingerprint\": \"fingerprint\",\n" + + " \"created_at\": \"created_at\",\n" + + " \"updated_at\": \"updated_at\"\n" + + " }\n" + + " ]\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 testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"alg\":\"hmac-sha256\",\"fingerprint\":\"fingerprint\",\"created_at\":\"created_at\",\"updated_at\":\"updated_at\"}")); + CreateKeysNetworkAclsResponseContent response = client.keys() + .networkAcls() + .create(CreateKeysNetworkAclsRequestContent.builder() + .name("name") + .alg(NetworkAclKeyAlgorithmEnum.HMAC_SHA256) + .value("value") + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + + "{\n" + + " \"name\": \"name\",\n" + + " \"alg\": \"hmac-sha256\",\n" + + " \"value\": \"value\"\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" + + " \"id\": \"id\",\n" + + " \"name\": \"name\",\n" + + " \"alg\": \"hmac-sha256\",\n" + + " \"fingerprint\": \"fingerprint\",\n" + + " \"created_at\": \"created_at\",\n" + + " \"updated_at\": \"updated_at\"\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( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"alg\":\"hmac-sha256\",\"fingerprint\":\"fingerprint\",\"created_at\":\"created_at\",\"updated_at\":\"updated_at\"}")); + NetworkAclKey response = client.keys().networkAcls().get("id"); + 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" + + " \"id\": \"id\",\n" + + " \"name\": \"name\",\n" + + " \"alg\": \"hmac-sha256\",\n" + + " \"fingerprint\": \"fingerprint\",\n" + + " \"created_at\": \"created_at\",\n" + + " \"updated_at\": \"updated_at\"\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"); + } + } + + /** + * Compares two JsonNodes with numeric equivalence and null safety. + * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. + * Allows 'actual' to have extra fields (e.g., default values added during serialization). + */ + private boolean jsonEquals(JsonNode expected, JsonNode actual) { + if (expected == null && actual == null) return true; + if (expected == null || actual == null) return false; + if (expected.equals(actual)) return true; + if (expected.isNumber() && actual.isNumber()) + return Math.abs(expected.doubleValue() - actual.doubleValue()) < 1e-10; + if (expected.isObject() && actual.isObject()) { + java.util.Iterator> iter = expected.fields(); + while (iter.hasNext()) { + java.util.Map.Entry entry = iter.next(); + JsonNode actualValue = actual.get(entry.getKey()); + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; + } + return true; + } + if (expected.isArray() && actual.isArray()) { + if (expected.size() != actual.size()) return false; + for (int i = 0; i < expected.size(); i++) { + if (!jsonEquals(expected.get(i), actual.get(i))) return false; + } + return true; + } + return false; + } +} diff --git a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json index 69e76cf56..7945c231a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json @@ -386,6 +386,12 @@ "allowed_strategies": [ "pingfederate" ], + "third_party_client_access": { + "default_value": "block", + "allowed_values": [ + "allow" + ] + }, "connection_deletion_behavior": "allow", "invitation_landing_client_id": "invitation_landing_client_id" }, diff --git a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json index 69e76cf56..7945c231a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json @@ -386,6 +386,12 @@ "allowed_strategies": [ "pingfederate" ], + "third_party_client_access": { + "default_value": "block", + "allowed_values": [ + "allow" + ] + }, "connection_deletion_behavior": "allow", "invitation_landing_client_id": "invitation_landing_client_id" }, diff --git a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json index 69e76cf56..7945c231a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json @@ -386,6 +386,12 @@ "allowed_strategies": [ "pingfederate" ], + "third_party_client_access": { + "default_value": "block", + "allowed_values": [ + "allow" + ] + }, "connection_deletion_behavior": "allow", "invitation_landing_client_id": "invitation_landing_client_id" }, diff --git a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json index 69e76cf56..7945c231a 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json @@ -386,6 +386,12 @@ "allowed_strategies": [ "pingfederate" ], + "third_party_client_access": { + "default_value": "block", + "allowed_values": [ + "allow" + ] + }, "connection_deletion_behavior": "allow", "invitation_landing_client_id": "invitation_landing_client_id" }, diff --git a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json index 700c8aa53..a1f02a97c 100644 --- a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json @@ -50,5 +50,13 @@ "scim" ] } + }, + "cross_app_access_resource_app": { + "status": { + "default_value": "enabled", + "allowed_values": [ + "enabled" + ] + } } } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testGet_response.json b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testGet_response.json index 700c8aa53..a1f02a97c 100644 --- a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testGet_response.json @@ -50,5 +50,13 @@ "scim" ] } + }, + "cross_app_access_resource_app": { + "status": { + "default_value": "enabled", + "allowed_values": [ + "enabled" + ] + } } } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testUpdate_response.json b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testUpdate_response.json index 700c8aa53..a1f02a97c 100644 --- a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testUpdate_response.json @@ -50,5 +50,13 @@ "scim" ] } + }, + "cross_app_access_resource_app": { + "status": { + "default_value": "enabled", + "allowed_values": [ + "enabled" + ] + } } } \ No newline at end of file diff --git a/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json b/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json index 3dc352a50..4b0030f5f 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json @@ -87,6 +87,7 @@ "connecting_ipv6_cidrs" ] }, + "match_all": true, "scope": "management" }, "created_at": "created_at", diff --git a/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json b/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json index 3dc352a50..4b0030f5f 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json @@ -87,6 +87,7 @@ "connecting_ipv6_cidrs" ] }, + "match_all": true, "scope": "management" }, "created_at": "created_at", diff --git a/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json index 3dc352a50..4b0030f5f 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json @@ -87,6 +87,7 @@ "connecting_ipv6_cidrs" ] }, + "match_all": true, "scope": "management" }, "created_at": "created_at", From 7a39e49ec8ef0c9a4a6ba892ba1287fcccf6ce4f Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 10:50:06 +0000 Subject: [PATCH 2/2] [fern-replay] advance lockfile --- .fern/replay.lock | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 895bd2df3..2afb23da0 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -30,5 +30,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-java-sdk: 4.11.1 -current_generation: 97f94ce5dd517846f1fd30ae84791654a7da96bd + - commit_sha: 91cdb7769f3d5d9facbd490ac199b4e030630b00 + tree_hash: e647d7fd4e3415ca818cdb93f8bf2df3f91ba3e0 + timestamp: 2026-08-18T10:50:01.135Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 +current_generation: 91cdb7769f3d5d9facbd490ac199b4e030630b00 patches: []